> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/local-governance/v2.7/platform/installation/more-deploy-docs/troubleshooting/monitoring.md).

# Monitoring & Alerts

​[Prometheus](https://github.com/prometheus) is an open-source system monitoring and alerting toolkit originally built at [SoundCloud](https://soundcloud.com/).

![](https://gblobscdn.gitbook.com/assets%2F-MERG_iQW5oN4ukgXP8K%2F-MGrw8HGOm3l_f8x_z_k%2F-MGrwL-4kKqpAxJeuFs6%2Fimage.png?alt=media\&token=5abd97b1-ed7e-4431-8b19-05990306b7c6)

​

​[prometheus-operator](https://github.com/egovernments/eGov-infraOps/tree/master/helm/charts/backbone-services/prometheus-operator) chart includes multiple components and is suitable for a variety of use-cases.

The default installation is intended to suit monitoring a kubernetes cluster the chart is deployed onto. It closely matches the kube-prometheus project.

* service monitors to scrape internal kubernetes components
  * kube-apiserver
  * kube-scheduler
  * kube-controller-manager
  * etcd
  * kube-dns/coredns
  * kube-proxy

With the installation, the chart also includes dashboards and alerts.

**Deployment steps**

1. Add environment variable to the respective env config file

![](https://gblobscdn.gitbook.com/assets%2F-MERG_iQW5oN4ukgXP8K%2F-MGrw8HGOm3l_f8x_z_k%2F-MGrwTLM-FUSNONevMC_%2Fimage.png?alt=media\&token=74b8862b-6559-4eeb-9c62-d6e6b135f259)

Update the configs branch (like for qa.yaml added qa branch)

1. Add [monitoring-dashboards](https://github.com/egovernments/configs/tree/master/monitoring-dashboards) folder to respective configs branch.
2. Enable the nginx-ingress monitoring and redeploy the nginx-ingress.

![](https://gblobscdn.gitbook.com/assets%2F-MERG_iQW5oN4ukgXP8K%2F-MGrw8HGOm3l_f8x_z_k%2F-MGrwh6EjT8WevJDyZlZ%2Fimage.png?alt=media\&token=ae3f08ef-c717-4542-8f4b-94ae24a354c8)

1. Add alertmanager secret in respective.secrets.yaml

   If you want you can change the slack channel and other details like group\_wait , group\_interval and repeat\_interval according to your values.

![](https://gblobscdn.gitbook.com/assets%2F-MERG_iQW5oN4ukgXP8K%2F-MGrw8HGOm3l_f8x_z_k%2F-MGrwr0B56IGjJ6WoQ_P%2Fimage.png?alt=media\&token=757e1fbe-3ccb-4365-a5b9-2b29134946bc)

​

1. Deploy the prometheus-operator using go cmd or deploy using Jenkins.

```
go run main.go deploy -e   -c 'prometheus-operator,grafana,prometheues-kafka-exporter'
```

**To create a new panel in the existing dashboard**

1. Login to dashboard and click on add panel

![](https://gblobscdn.gitbook.com/assets%2F-MERG_iQW5oN4ukgXP8K%2F-MGrw8HGOm3l_f8x_z_k%2F-MGrxHZVT0kM_QOnu_qT%2Fimage.png?alt=media\&token=51014ac7-993c-4a98-8478-6de51133f090)

1. Set all required queries and apply the changes. Export the JSON file by clicking on t the save dashboard

![](https://gblobscdn.gitbook.com/assets%2F-MERG_iQW5oN4ukgXP8K%2F-MGrw8HGOm3l_f8x_z_k%2F-MGrxSGhocrCKvWfVyjF%2Fimage.png?alt=media\&token=9a694df7-f8be-4186-a928-2b39e25e2706)

1. Update the existing \*-dashboard.json file from configs monitoring-dashboards folder with a newly exported JSON file.

​

[![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)​](http://creativecommons.org/licenses/by/4.0/)All content on this page by [eGov Foundation](https://egov.org.in/) is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/local-governance/v2.7/platform/installation/more-deploy-docs/troubleshooting/monitoring.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
