You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Hi all,
I wanted to ask a question , I am trying to perform cpu_cores and memory_bytes query on the same graph for a particular namespace.How can i write a query for this .I am new to promql programming.Would appreciate it if anyone could help.
Thanks
Brian Candler
unread,
Sep 7, 2021, 2:28:27 AM9/7/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Mixing two different metrics in the results of same PromQL query doesn't make sense, because those values represent different things. For example you might get back 4 values from the query, 2 of which are numbers of CPU cores and 2 of which are numbers of bytes, which are not comparable and indeed have very different magnitude. For this reason it's intentionally not straightforward to do.
What you really want is to overlay two *separate* PromQL queries onto the same graph, where the separate queries can be displayed with different colours, different scales and axes etc. That will be a function of whatever dashboarding tool you are using - e.g. grafana is a common choice. In grafana it's easy to add multiple queries to a panel. Note that if you have questions about grafana, it has its own separate discussion forum.