You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Element-wise PromQL arithmetic between two different metric names with no explicit
matcher (A / B, the implicit label-aligned case) is routed to the native PROMQL ES|QL
command, where it silently returns zero rows. The panel is reported as migrated
(green, confidence 0.9, no warning) and renders empty in Kibana while the source panel shows
real values.
Elasticsearch's PROMQL command appears to include __name__ in the implicit vector-matching
key. Real PromQL excludes the metric name when matching binary-operator operands, so two
different metrics can never match and the result set is empty.
H succeeding while C/K return nothing is the key datum: the operands differ only in __name__, so the implicit matching key evidently includes it.
Note that I/J fail loudly (400), which the engine can detect, whereas the default
matcher-less form fails silently — which is what makes this dangerous.
This report is the gap between the two: distinct-metric, element-wise, matcher-less
arithmetic now takes the native path that #138/#146 opened, and that path yields nothing.
Aggregated forms (sum(A)/sum(B), case F) are unaffected — the same dashboard's
"Cluster CPU Requested" tile uses that shape and matches Grafana exactly.
Degrade gracefully. If the native path is kept, the panel must not be reported as clean migrated. Silently emitting a query that always returns zero rows hides a semantic gap,
which the repo's "degrade gracefully" rule explicitly forbids.
A validation check would also catch this class generally: a panel whose query returns zero
rows against a target that does contain both referenced metrics is a translation failure,
not a data gap.
Summary
Element-wise PromQL arithmetic between two different metric names with no explicit
matcher (
A / B, the implicit label-aligned case) is routed to the nativePROMQLES|QLcommand, where it silently returns zero rows. The panel is reported as
migrated(green, confidence 0.9, no warning) and renders empty in Kibana while the source panel shows
real values.
Elasticsearch's
PROMQLcommand appears to include__name__in the implicit vector-matchingkey. Real PromQL excludes the metric name when matching binary-operator operands, so two
different metrics can never match and the result set is empty.
Reproduction
Dashboard: grafana.com 13332 "kube-state-metrics-v2",
panel
Statefulset replicas.Grafana renders two series (
prometheus,postgres) at 100%. The migrated panel isempty; the emitted query returns 0 rows:
Evidence — bisected against the same index
Both operands have identical label sets (
cluster,namespace,statefulset,job,instance,origin_prometheus) and both are populated.kube_statefulset_status_replicas_ready{…}kube_statefulset_status_replicas{…}A / BA / B * 100(as migrated)A / B, no variable filterssum(A) / sum(B)B * 2(vector × scalar)B / B(same metric name)A / on(statefulset) BVectorBinaryArithmetic queries with group modifiers are not supported at this timeA / ignoring(__name__) Bkube_hpa_status_current_replicas / kube_hpa_spec_max_replicasHsucceeding whileC/Kreturn nothing is the key datum: the operands differ only in__name__, so the implicit matching key evidently includes it.Note that
I/Jfail loudly (400), which the engine can detect, whereas the defaultmatcher-less form fails silently — which is what makes this dangerous.
Relationship to prior work
on()/ignoring()/group_left()matchers anddocumented the same 400 error for those.
(first for line/timeseries, then for single-value tiles).
This report is the gap between the two: distinct-metric, element-wise, matcher-less
arithmetic now takes the native path that #138/#146 opened, and that path yields nothing.
Aggregated forms (
sum(A)/sum(B), case F) are unaffected — the same dashboard's"Cluster CPU Requested" tile uses that shape and matches Grafana exactly.
Expected
Either:
metric names with no aggregation wrapper, use the per-key ES|QL aggregation shape from
Grafana → Kibana: migrate label-aligned vector-matching joins via a per-key ES|QL aggregation instead of marking them not-feasible #156 (
STATS a = …, b = … BY <shared labels>, TBUCKET | EVAL result = a / b) instead ofnative PROMQL; or
migrated. Silently emitting a query that always returns zero rows hides a semantic gap,which the repo's "degrade gracefully" rule explicitly forbids.
A validation check would also catch this class generally: a panel whose query returns zero
rows against a target that does contain both referenced metrics is a translation failure,
not a data gap.