How to Monitor Elasticsearch and OpenSearch with Vigilmon
Elasticsearch and OpenSearch power search and analytics for millions of applications. When they go down, users lose search functionality, dashboards go blank, and log pipelines stall. This guide shows you how to monitor Elasticsearch and OpenSearch clusters with Vigilmon — covering HTTP checks, cluster health, and alert setup.
Why Monitor Elasticsearch?
Elasticsearch is critical infrastructure but notoriously tricky to monitor:
- Cluster status can shift from green → yellow → red without warning
- Individual node failures may not be immediately visible
- The REST API exposes dozens of health metrics you need to watch
- Disk space and JVM heap are common silent killers
What to Monitor in Elasticsearch
1. Cluster Health Endpoint
Elasticsearch exposes a built-in health check:
curl http://localhost:9200/_cluster/health
Response:
{
"cluster_name": "my-cluster",
"status": "green",
"number_of_nodes": 3,
"number_of_data_nodes": 3,
"active_shards": 120
}
Status values:
- green: All shards allocated — fully operational
- yellow: Primary shards allocated, some replicas missing — degraded
- red: Some primary shards unallocated — data loss risk
2. Node Availability
curl http://localhost:9200/_nodes/stats
3. Index Health
curl http://localhost:9200/_cat/indices?v
Setting Up Vigilmon for Elasticsearch
Monitor 1: Basic HTTP Availability
Create a monitor in Vigilmon for the root endpoint:
-
URL:
http://your-es-host:9200 - Method: GET
- Expected status: 200
- Check interval: 60 seconds
- Multi-region: Enable (gets consensus across 3+ regions)
Monitor 2: Cluster Health Check
-
URL:
http://your-es-host:9200/_cluster/health - Method: GET
-
Keyword check: Add
"status":"green"(alert if this string is absent) - Alert on: Non-200 response OR keyword missing
This way Vigilmon alerts you the moment your cluster degrades from green.
Monitor 3: OpenSearch Health (Same Endpoint)
OpenSearch (AWS's open-source fork) uses identical API endpoints:
-
URL:
https://your-opensearch-endpoint:9200/_cluster/health - Method: GET
- Auth: Add your OpenSearch username/password as basic auth headers
Configuring Alerts
In Vigilmon, set up escalating alerts:
- Immediate alert (< 1 min): Slack or PagerDuty webhook when cluster goes red
- Degraded alert (> 2 min yellow): Email or SMS when cluster stays yellow
- Recovery notification: Auto-alert when cluster returns to green
Settings → Monitors → [Monitor Name] → Alert Channels
Multi-Region Consensus for Elasticsearch
Vigilmon checks from multiple geographic regions simultaneously. This eliminates false alerts caused by:
- Network blips between your monitoring server and ES cluster
- Single-point-of-failure in traditional monitoring setups
- DNS resolution issues in specific regions
A true Elasticsearch outage will be confirmed from 3+ locations before alerting.
Monitoring Elasticsearch on AWS / Elastic Cloud
For managed Elasticsearch services:
- AWS OpenSearch: Monitor the HTTPS endpoint AWS provides
- Elastic Cloud: Use the Elasticsearch endpoint from your cloud console
-
Authentication: Set
Authorization: ApiKey <your-key>header in Vigilmon monitor settings
Best Practices
- Monitor both HTTP and cluster health — a running ES instance can still have a red cluster
- Set appropriate timeouts — ES can be slow under load; set 10–30s timeout before alerting
- Alert on yellow too — yellow clusters are one node failure from red
-
Monitor disk space indirectly — ES goes read-only at 85% disk; a keyword check on
/_cluster/settingscan catch flood watermarks - Use separate monitors per node — for critical clusters, monitor each node individually
Quick Start Summary
| Monitor | URL | Check |
|---|---|---|
| Availability | http://es:9200 |
Status 200 |
| Cluster Health | http://es:9200/_cluster/health |
Keyword: green
|
| Index Status | http://es:9200/_cat/health |
Status 200 |
Conclusion
Elasticsearch and OpenSearch are powerful but require active monitoring. With Vigilmon, you get multi-region HTTP checks, keyword monitoring, and instant alerts — no agent installation, no complex setup.
Start monitoring your Elasticsearch cluster free at vigilmon.online
Top comments (0)