Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 when querying prometheus with "~" character in filters #4818

Closed
Winael opened this Issue Nov 2, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Winael
Copy link

Winael commented Nov 2, 2018

Bug Report

What did you do?

I set up Grafana to be able to query prometheus. I use grafana's variables in my query

60*rate(kong_hit{api_name=~"[[client]]"}[5m])

What did you expect to see?

A grapsh, and the ability to change filters with grafana

What did you see instead? Under which circumstances?

Request error:

Request
Request details
Url | /api/datasources/proxy/2/api/v1/query_range?query=60*rate(kong_hit%7Bapi_name%3D~%22https-mock-service%22%7D%5B5m%5D)&start=1541150601&end=1541151201&step=2
-- | --
Method | GET
Accept | application/json, text/plain, /

Response

{
  "status": "error",
  "errorType": "execution",
  "error": "server returned HTTP status 500 Internal Server Error",
  "message": "server returned HTTP status 500 Internal Server Error"
}

Environment

  • System information:

    Linux 4.15.0-24-generic x86_64

  • Prometheus version:

    prometheus, version 2.4.3 (branch: HEAD, revision: 167a4b4e73a8eca8df648d2d2043e21bdb9a7449)
      build user:       root@1e42b46043e9
      build date:       20181004-08:42:02
      go version:       go1.11.1
  • Prometheus configuration file:
# Sample config for Prometheus.

global:
  scrape_interval:     15s # By default, scrape targets every 15 seconds.
  evaluation_interval: 15s # By default, scrape targets every 15 seconds.
  # scrape_timeout is set to the global default (10s).

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
      monitor: 'example'

# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
    - "*.rules.yml"
  # - "second.rules"

alerting:
  alertmanagers:
  - static_configs:
    - targets:
      - alertmanager:9093
    scheme: http
    timeout: 10s

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s
    scrape_timeout: 2s

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ['localhost:9090']

remote_write:
  - url: http://prometheus-fast-remote:8080/write
      
remote_read:
  - url: http://prometheus-fast-remote:8080/read
  • Logs:
level=error ts=2018-11-02T11:03:14.085343885Z caller=engine.go:498 component="query engine" msg="error selecting series set" err="server returned HTTP status 500 Internal Server Error"```
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Nov 2, 2018

It looks like you've a remote read backend that doesn't support that matcher.

@Winael

This comment has been minimized.

Copy link
Author

Winael commented Nov 5, 2018

@brian-brazil Thx, for your answer I will look on that way

@Winael Winael closed this Nov 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.