Build a graph based on labels

Hi everyone!

I have my own metrics that looks like:

my_metric{id="object1",date="2021-10-11T22:55:54Z" } 1
my_metric{id="object2",date="2021-10-11T22:20:00Z" } 4

I want to make a graph with label ‘date’ by X-axis and metric value by Y-axis. There should be value points for different IDs.
In other words, I want to change the default timeline to my new one.

Are there some ideas how to do it or should I change my metrics?

Thank you

Are you using Prometheus @mazzybig? Please specify datasource.

One gotcha I can see here is that Prometheus labels are strings, so your timestamp, date, would need to change its data type to work as a time field

Yes, I’m using Prometheus. I create my own metrics using bash-script that saves them to prom-file for node-exporter.

your timestamp, date, would need to change its data type to work as a time field

I couldn’t get this point. Can you please explain what should I do?

As I said earlier, I can create my own metrics in any format. So now I’m looking for a better approach.