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.