Metrics¶
With tool_prometheus installed, the plugin adds these metrics to its endpoint. They are read from tool_opensearch_stream, updated by the ship_queue task: a scrape never counts the queue.
Metric |
Type |
Description |
|---|---|---|
|
gauge |
1 when the last run of |
|
gauge |
Documents waiting, at the last run of |
|
gauge |
Age of the oldest queued document (0 if none). |
|
counter |
Documents accepted by OpenSearch. |
|
counter |
Documents rejected by OpenSearch (usually a field not in the mapping) and discarded. |
|
counter |
Documents discarded because the queue was full. |
|
gauge |
Unix time of the last accepted document. |
Suggested alerts¶
- alert: MoodleOpenSearchDown
expr: moodle_tool_opensearch_up == 0
for: 15m
- alert: MoodleOpenSearchQueueStuck
expr: moodle_tool_opensearch_queue_oldest_age_seconds > 1800
for: 10m
- alert: MoodleOpenSearchDropping
expr: increase(moodle_tool_opensearch_documents_dropped_total[15m]) > 0
- alert: MoodleOpenSearchRejecting
expr: increase(moodle_tool_opensearch_documents_failed_total[1h]) > 0
A failing ship_queue task is also reported by tool_taskmonitor.