# Inspect PromQL vector matching when a ratio unexpectedly disappears

> Arithmetic combines matching label sets; an unmatched input is not automatically treated as zero.

- Canonical URL: https://update.dsesecurity.com/updates/inspect-promql-vector-matching-when-a-ratio-unexpectedly-disappears/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-10-20T18:15:41+00:00
- Modified: 2026-10-20T18:34:33+00:00
- Last reviewed by DSE: 2026-10-20
- Resource type: Guide
- DSE priority: Information
- Topics: IT, Networks & Infrastructure
- Reading time: 2 minutes

## What you need to know

Arithmetic combines matching label sets; an unmatched input is not automatically treated as zero.

## Potentially affected

Review default PromQL vector matching and deliberate one-to-one or many-to-one arithmetic relationships.

## DSE recommendation

DSE recommends inspecting each side of a missing ratio independently before changing its arithmetic.

## Article

Arithmetic combines matching label sets; an unmatched input is not automatically treated as zero.

## Source facts

Prometheus binary vector operations try to match entries across the two vectors. By default, series without a matching counterpart are excluded. The on and ignoring keywords control matching labels, while group_left and group_right support deliberate many-to-one or one-to-many cases. The output therefore depends on label relationships as well as numeric values.

Source: [Prometheus documentation — Operators](https://prometheus.io/docs/prometheus/latest/querying/operators/).

## Applicability

Review default PromQL vector matching and deliberate one-to-one or many-to-one arithmetic relationships.

## DSE recommendation

DSE recommends inspecting each side of a missing ratio independently before changing its arithmetic. Compare label names, values, aggregation levels, and expected cardinality. Decide which labels define the same logical entity and document that decision in the query. Avoid adding a group modifier merely to silence an error without checking whether the join duplicates or misattributes meaning. Keep absent-data handling separate from matching so a disappeared denominator does not silently become a reassuring result.

## Verification

Use a test pair of vectors with matching, mismatched, and missing label combinations. Compare the output before and after the intended matching clause. Verify the result contains the expected entity count and labels, then confirm a deliberately absent input is surfaced according to the operational requirement. Retain each source vector and the final labels beside the query. Ask the service owner to reconcile the expected entity population with the output, including the case where an input exists but has no eligible counterpart.

## Official reference

[Prometheus documentation — Operators](https://prometheus.io/docs/prometheus/latest/querying/operators/). Reviewed October 20, 2026.

## Primary reference

- Name: Prometheus documentation — Operators
- Authority: prometheus.io
- URL: https://prometheus.io/docs/prometheus/latest/querying/operators/
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Inspect PromQL vector matching when a ratio unexpectedly disappears,” DSE Security, https://update.dsesecurity.com/updates/inspect-promql-vector-matching-when-a-ratio-unexpectedly-disappears/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
