Add Prometheus alerting rules for KV-cache metrics#676
Open
satyamg1620 wants to merge 1 commit into
Open
Conversation
Signed-off-by: satyamg1620 <Satyam.Gupta.3@ibm.com>
satyamg1620
requested review from
dannyharnik,
kfirtoledo,
liu-cong and
vMaroon
as code owners
June 20, 2026 19:20
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a default set of Prometheus alerting rules for KV-cache health/saturation signals, and wires them into the example monitoring deployment so operators get alerts out of the box (with promtool tests to validate correctness).
Changes:
- Added canonical Prometheus alerting rules for KV-cache index + tokenization metrics (plus optional vLLM alerts).
- Wired alert rule loading into the example Prometheus ConfigMap/deployment and added a Prometheus Operator
PrometheusRulevariant. - Added promtool unit tests and updated monitoring documentation with an “Alerting Rules” section.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| kv_connectors/llmd_fs_backend/docs/monitoring.md | Documents where alert rules live, how to load/validate them, and operator-specific usage. |
| kv_connectors/llmd_fs_backend/docs/deployment/monitoring/prometheus.yaml | Loads alert rule files via rule_files and embeds the rule file into the example Prometheus ConfigMap. |
| kv_connectors/llmd_fs_backend/docs/deployment/monitoring/prometheus-rules.yaml | Adds a PrometheusRule CRD with the same alert definitions for prometheus-operator installs. |
| kv_connectors/llmd_fs_backend/docs/deployment/monitoring/kvcache-alerts.test.yaml | Adds promtool unit tests covering the new alert rules. |
| kv_connectors/llmd_fs_backend/docs/deployment/monitoring/kvcache-alerts.rules.yml | Adds the canonical plain-format rules file and associated guidance/comments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+122
to
+124
| | `monitoring/kvcache-alerts.rules.yml` | Canonical plain rules file (source of truth). | | ||
| | `monitoring/prometheus-rules.yaml` | `PrometheusRule` CRD for prometheus-operator setups. | | ||
| | `monitoring/kvcache-alerts.test.yaml` | `promtool` unit tests for the rules. | |
| | `monitoring/prometheus-rules.yaml` | `PrometheusRule` CRD for prometheus-operator setups. | | ||
| | `monitoring/kvcache-alerts.test.yaml` | `promtool` unit tests for the rules. | | ||
|
|
||
| The bundled `monitoring/prometheus.yaml` already wires the rules in via |
Comment on lines
+3
to
+7
| # This is the canonical, plain-format rules file. It is consumed two ways: | ||
| # 1. Wired into the example prometheus.yml via `rule_files` (see prometheus.yaml). | ||
| # 2. Mirrored into a PrometheusRule CRD for prometheus-operator setups | ||
| # (see prometheus-rules.yaml). Keep the two in sync. | ||
| # |
Comment on lines
+6
to
+8
| # Rule content is kept identical to kvcache-alerts.rules.yml — update both | ||
| # together. If not using the operator, wire kvcache-alerts.rules.yml into your | ||
| # prometheus.yml via `rule_files` instead (see prometheus.yaml). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds default Prometheus alerting rules for the KV-cache metrics,
so operators get sensible alerts out of the box instead of writing their own.
Rules (under
kv_connectors/llmd_fs_backend/docs/deployment/monitoring/):kvcache_index_lookup_latency_seconds> 500msDeliverables
kvcache-alerts.rules.yml— canonical plain rules fileprometheus-rules.yaml—PrometheusRuleCRD for prometheus-operator setupsprometheus.yaml— rules wired into the example config viarule_fileskvcache-alerts.test.yaml— promtool unit testsmonitoring.md— new "Alerting" sectionFixes: #664