Skip to content

Comparison binary operators #2109

Open
Open

Description

@bestboylm

“Between an instant vector and a scalar” I get a result which does not match the description of the section.

See attached picture for details!!!

promql1

Activity

  1. hdost commented on May 16, 2022

    @hdost
    Contributor

    I'm not sure I understand the what the question is?
    The purpose of using the bool operator means that for example the value is like this. If some imaginary values that would match your query results.

    prometheus_http_requests_total{code="200", handler="/-/ready", instance="localhost:9090", job="prometheus"} 96
    prometheus_http_requests_total{code="200", handler="/api/v1/query_range", instance="localhost:9090", job="prometheus"} 105
    

    Would result based on the query as:

    prometheus_http_requests_total{code="200", handler="/-/ready", instance="localhost:9090", job="prometheus"} 0
    prometheus_http_requests_total{code="200", handler="/api/v1/query_range", instance="localhost:9090", job="prometheus"} 1
    

    Whereas if you queried:

    prometheus_http_requests_total > 100

    Then you would only receive:

    prometheus_http_requests_total{code="200", handler="/api/v1/query_range", instance="localhost:9090", job="prometheus"} 105
    
  2. hdost commented on May 31, 2022

    @hdost
    Contributor

    @bestboylm Does this answer your question?

  3. lasomethingsomething commented on Nov 23, 2026

    @lasomethingsomething

    @jan--f would close, non-responsive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions