Hi
I have a gauge Prometheus metric that consists of some labels and the value is epoch time when the event occur
The metric is like this for example for Pull Requests created date
azure_devops_pullrequest_status{instance=“host.docker.internal:9999”, job=“azure_devops_node”, projectID=“083eadf1-f5a1-45d9b7a03”, pullrequestID=“3448”, repositoryID=“4071ba”, status=“completed”, type=“created”} 1588869907
of this for completed Pull Request
azure_devops_pullrequest_status{instance=“host.docker.internal:9999”, job=“azure_devops_node”, projectID=“083eadf1-f-8e9b109b7a03”, pullrequestID=“3448”, repositoryID=“4071bae3-b3f1-b1f2e12ddf10”, status=“completed”, type=“closed”} 1588946178
I would like to create a graph made of bars that show when the metrics occur using its value
Something like this
Is this feasable in Grafana?
If yes what is the best approach?
Thanks for the help
Alberto
@albertomorando have you tried using the time-series
visualization and then setting the style in the panel editor to bars
? If you did that and then added two promql queries, one for opened time and another for closed time, then I think you’d be pretty close to that graph…
Check out play.grafana.org for inspiration and help:
https://play.grafana.org/d/000000029/prometheus-demo-dashboard?orgId=1&refresh=5m
mattabrams:
time-series
Hi @mattabrams
Thanks for your reply and help
I have tried as you said to set the time-series panel type and bars
This is the result
As you can see the issue is that all the metrics values are on the y-axis but I should have them on the X-axis to be able to get the something like this
Do you know how I can swap the Y-axis with the X-axis?
Or do I need to create a new metrics in the exporter (we have control over the Prometheus exporter)?
Please let me know if you have any suggestion
Thanks