Hi,
I am trying to convert the following query to Prometheus but am seeing some
odd behaviour:
SELECT non_negative_derivative("wait_time_ms", 1s) /
non_negative_derivative("waiting_tasks_count", 1s) FROM
"sqlserver_azuredb_waitstats" WHERE ("sql_instance" =~ /^$InstanceName$/
AND "database_name'" =~ /^$DatabaseName$/) AND $timeFilter GROUP BY
"wait_type"
This is what I have in prom
rate(sqlserver_azuredb_waitstats_wait_time_ms{sql_instance="$sql_instance",database_name="$databaseName"}[5m])>=0/rate(sqlserver_azuredb_waitstats_waiting_tasks_count{sql_instance="$sql_instance",
database_name="$databaseName"}[5m])>=0
The problem I have here is that the group by in the influx query ensures
the division is done on the same label where as in prom it is matching with
a label with a different name, I'm sure this is possible rather than me
having to add a seperate query for each label in the above metrics but not
sure how this can be achieved.
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/d4f05fbf-ddcc-45bc-b0d8-b5974ad0e11a%40googlegroups.com.