oracle / oci-grafana-metrics

Grafana datasource plugin for OCI metrics
https://grafana.com/grafana/plugins/oci-metrics-datasource
Universal Permissive License v1.0
80 stars 40 forks source link

Is it possible to do some math between metrics? #209

Closed JavierCCC closed 8 months ago

JavierCCC commented 1 year ago

I need to monitor de amount of available/healthy backend servers behind a LBAAS. There are two metrcis, BackendServers and UnHealtyBackendServers. I need to show:

BackendServers - UnHealtyBackendServers

The plugin doesnt allow expressions between queries: is there any way to achieve this?

mamorett commented 1 year ago

Hi. Can you share the queries you are using ? Thanks.

JavierCCC commented 1 year ago

Hi mamorett. These are the queries im using:

image

image

mamorett commented 1 year ago

Hi Javier. Unfortunately I do not think you will be able to do math between these two queries. You can display both graph on the same panel but not do math.

JavierCCC commented 1 year ago

So, i was able to achieve the metric i was looking for using the text edit mode with this query:

BackendServers[1m].mean() - UnHealthyBackendServers[1m].mean()