Graph showing more that one measurement when only one is selected

I’m sure I’m misunderstanding something, but here we go.

I generated the following Prometheus file.

# HELP users_active_minute_total Total number of active users in the past minute.
# TYPE users_active_minute_total gauge
users_active_minute_total 8 1584018000000
# HELP users_active_hour_total Total number of active users in the past hour.
# TYPE users_active_hour_total gauge
users_active_hour_total 71 1584018000000

Aside: Note the included timestamps…I realize this is not documented but it works. The default sample rate of once every 10 seconds is too fast, and using tasks to downsample doesn’t work when you’re counting unique users because it’s not a simple math function.

I have a scraper that grabs this file. It brings the data in just fine.

I set up a dashboard and added a cell to it.

But when I do that it includes both the minute and hour active users. (Minute is purple; I added that one after the hour one was running for a while).

What should I be doing differently?

Is it because these are both the same “_field”? I am following the Prometheus specification here by setting these to a “gauge” type.
image

@ziebelje This definitely looks like a bug. Switch over the script builder and see what filter it’s actually adding. What version of InfluxDB 2 are you using?

influxdb_2.0.0-beta.5

from(bucket: "app")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)

I’m not familiar with Flux but I believe I see the issue. If I manually update that query it works

from(bucket: "app")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) =>
    r._measurement == "users_active_minute_total")

I attempted to get a screen recording, so I removed all of my cells and started over…this time it worked as expected.

Interesting. Thanks for reporting. influxdb_2.0.0-beta.6 dropped yesterday so you may consider upgrading and see if you can reproduce the bug again.