prometheus: Incorrect regex matching when querying using Prometheus 2

What did you do? I ran the query container_cpu_system_seconds_total{container_name=~"prometheus.*"}

What did you expect to see? I expected results with container_name="prometheus" AND container_name="prometheus2"

What did you see instead? Under which circumstances? I have 2 Prometheus servers running side by side, monitoring the same targets. (Reproducing/Tracking @fabxc metrics listed in https://fabxc.org/blog/2017-04-10-writing-a-tsdb/)

My 1.5.2 server returns the expected (multiple) results. (6 in this case) but the v2.0.0-alpha.0 is only returning 4 of the values. It doesn’t match against prometheus or prometheus2, but it does match against prometheus-load1, prometheus-dev3, etc.

I verified that the missing ones are present and can filter against them directly with queries like container_name=~"prometheus" (when I leave .* off the end)

Environment Prometheus v2.0.0-alpha.0 running on Kubernetes 1.5

  • System information:

Linux 4.4.0-53-generic x86_64

  • Prometheus version:
prometheus, version 2.0.0-alpha.0 (branch: master, revision: ece483c0c1f2ad11e7dc749ea958669b0914c1c3)
  build user:       root@cd2fcfcce982
  build date:       20170410-11:14:31
  go version:       go1.8

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

@fabxc can we get https://github.com/prometheus/tsdb/pull/77 vendored into dev-2.0. Would love to try it out 😃