Hello,
My goal is to avoid to manage multiple services for the ‘same’ objective (monitoring).
I want to extract “Available Downtime before SST Required” chart (prometheus) from grafana-dashboards/dashboards/PXC_Galera_Graphs.json at pmm-1.x · percona/grafana-dashboards · GitHub & convert it to influxdb query.
- Prometheus query:
“expr”: “mysql_galera_gcache_size_bytes{instance=~"$host"} /\n(rate(mysql_global_status_wsrep_replicated_bytes{instance=~"$host"}[1h])+rate(mysql_global_status_wsrep_received_bytes{instance=~"$host"}[1h]))”,
-
Human query:
128/(wsrep_received_bytes(last) – wsrep_received_bytes(-60s)) + (second wsrep_replicated_bytes(last) – wsrep_replicated_bytes(-60s))
-
Influxdb query (I want something like if possible…):
SELECT 128/(last((“wsrep_received_bytes”)-(-60s(“wsrep_received_bytes”)))+(last(“wsrep_replicated_bytes”)-(-60s(“wsrep_replicated_bytes”)))) FROM “mysql” WHERE (“host” =~ /^$cluster_node/) AND $timeFilter GROUP BY time($__interval), “host” fill(none)
My issue is that I don’t know how to get the last not null data 60 sec before.
Do you have an idea?
Best regards,