Monitoring self-hosted OpenSearch
For self-hosted OpenSearch, monitoring typically involves collecting metrics from the cluster, visualizing those metrics, and setting up alerts for key conditions.
Collecting metrics with Prometheus
We recommend using the Prometheus exporter plugin for OpenSearch to expose OpenSearch metrics in a format that Prometheus can scrape. Once installed and configured, Prometheus regularly collects these metrics, giving you a comprehensive view of your cluster’s state over time.
Visualizing metrics with Grafana
Grafana is a popular choice for visualizing metrics collected by Prometheus. By connecting Grafana to your Prometheus server, you can create dashboards that display key OpenSearch metrics such as cluster health, resource utilization, and query performance. For a quick and comprehensive start, use the OpenSearch Grafana dashboard. This dashboard is designed to work with metrics exposed by the OpenSearch Prometheus Exporter and provides a well-structured overview of essential OpenSearch metrics. You can import this dashboard directly into your Grafana instance and customize it to fit your monitoring needs.
Alerting with Prometheus
Prometheus supports flexible alerting rules, so you can receive notifications when metrics cross defined thresholds. The OpenSearch Prometheus Exporter mixin provides example Prometheus alert rules you can use as a foundation for your own alerting configuration. These rules cover common scenarios such as cluster health degradation, high resource usage, and indexing or search issues. You can integrate alerts with various notification channels, including email and chat platforms, to ensure a timely response.