Can disabled queries in Graph panels be used, to create Grafana alerts?

Hi,

is it possible to use disabled queries in Grafana graph panels to create Grafana alerts?

Why do you want to do that (Background)?

I am having one metric providing information about disk pace usage on certain directories on a server. This metric I am using to show the information on graph panel.

There is a second metric which is providing also information about disk space usage on certain directories on a server, but is showing the disk space usage in percentage instead of units.

I would like to use the second metric to create Grafana alerts - on the same graph panel (For example: If the disk space usage of a certain directory is going above X%, then ALERT.

Since I do not want to display the scond metric on a Graph panel, I am using Grafanas feature to disable this query.

Now the question is, can I use this disabled query to create Grafana alerts?

Many thanks in advance.

[Grafana version: 6.5, Datasource: Prometheus]

Best regards
HamidJa

Hi HamidJa,

Yes, you can do that, i have used the same trick.

Hi @danielgonzalez,

thank you for the feedback.

This is a very nice feature, as you do not need to create a new graph panel only for that alert :slight_smile: