Setup Bahmni Observability Stack

Observability stack for any product is crucial for ensuring the smooth operation of the product and facilitating proactive monitoring and resolution of any issues. Bahmni out-of the box ships with the following stacks for monitoring and centralised logging.

  1. Prometheus, Grafana → Monitororing

  2. Promtail, Loki, Grafana → Centralised Logging

Implementers can choose to add additional tooling / plugins to extend the monitoring functionality. The bahmni-observability stack is a reference configuration that is shipped out of the box.

Recommended setup architecture for monitoring stack

image.jpg

The most effective method for setting up the observability stack for a production system is to deploy the monitoring stack on a separate machine or instance, instead of running it within the Bahmni application server. This setup guarantees a reliable monitoring solution for efficiently detecting and addressing any issues that may occur within the application server instance. Moreover, this configuration helps in reducing resource consumption on the application server.

How does the metrics and logs are aggregated

Bahmni Observability stack includes node-exporter and cAdvisor for gathering server (node) metrics and container metrics, respectively. These agents must be executed on each Bahmni node under management. The agents' endpoints are set up in Prometheus, which retrieves metrics at a set interval and stores the time series data. Additionally, there are numerous exporters accessible for implementers to deploy based on their requirements. For further information on available exporters, please consult this page.

Bahmni Observability stack leverages Loki for log collection and aggregation. The loki docker driver plugin faciltates pushing of the logs of each container configured with loki logging to a central loki instance. The loki instance URL needs to be configured in the .env file. The logs are then pushed from the application server to the monitoring server.

 

Pages in this section

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)