I am pretty new to grafana & loki & trying to figure out some simple queries maybe for you guys 😀
lets say i have the below 2 queries & each of them return a number.
A.
count by(count) (sum by(label_ELM_jobId) (count_over_time({label_ELM=”offboard”} |~ INFO
[$__auto])))
B.
count by(count) (sum by(label_ELM_jobId) (count_over_time({label_ELM=”offboard”} |~ ERROR
[$__auto])))
query B results are desired & ok & i want it unchanged but in query A i want to apply this logic , query A result – query B result = final integer, basically i want both these queries in a single Bar chart
Tried this one but i dont think it works – count by(count) (sum by(label_ELM_jobId) (count_over_time({label_ELM=”offboard”} |~ INFO
[$__auto]))) unless count by(count) (sum by(label_ELM_jobId) (count_over_time({label_ELM=”offboard”} |~ ERROR
[$__auto])))
Smooth-Home2767 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.