4

I want to set an alert on a graph in Grafana, but I am not able to set.

If the used value in graph exceeds above 27 TiB then it should create an alert.

Also, I want slack notification of grafana graph after every four or six hours. But I am not able to see any option for that. Can you please help me regarding this

enter image description here enter image description here

1 Answers1

1
  • Check the Axes tab --> X-Axis column: If you are calculating Total in the value part as you can see in the below

enter image description here


  • Then, change the avg() to sum() in the Condition:

enter image description here

Benyamin Jafari
  • 27,880
  • 26
  • 135
  • 150
Sepehr roosta
  • 567
  • 1
  • 5
  • 11
  • I tried this answer but it is still not working. I have updated question with `Axes` details. Can you suggest me what to do next ! –  Jan 22 '19 at 13:33
  • 2
    @Abhijeet Now you are calculating Sum() of metric B in last 5 minutes, Change it to 1hour, Something like this: WHEN sum() OF query(B,1h,now) IS ABOVE ... – Note that your dashboard time range (Last 1 hour), makes your graph's value. – – Sepehr roosta Jan 23 '19 at 06:06
  • What should be values for `If no data or all values are null` and `If execution error or timeout` –  Jan 23 '19 at 06:53
  • @Abhijeet These are for times when data is intrrupted or server is Disconnected. – Sepehr roosta Jan 23 '19 at 06:57
  • Also, I want slack notification of grafana graph after every four or six hours. But I am not able to see any option for that. Can you please help me regarding this –  Jan 24 '19 at 11:02
  • @Abhijeet Have you added `slack` in notification channels? – Sepehr roosta Jan 26 '19 at 09:46
  • Yes I have added `slack` notification channel. but grafana is not sending alerts only once it sent alert at beginning. –  Jan 27 '19 at 05:02
  • @Abhijeet In Grafana -> notification channels -> YOUR_SLACK_CHANNEL ; uncheck `send on all alerts` and `include image`, then try `Send Test` – Sepehr roosta Jan 27 '19 at 05:40
  • 1
    @Abhijeet Please make a new question, then we can attach pictures. – Sepehr roosta Jan 27 '19 at 05:44
  • It is sending notification to slack. –  Jan 27 '19 at 05:48
  • I want to send notification on slack channel after every 4 or 6 hours. –  Jan 27 '19 at 05:49
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/187377/discussion-between-abhijeet-and-sepehr-roosta). –  Jan 27 '19 at 06:13
  • You can find my new question on link `https://stackoverflow.com/questions/54326655/i-want-to-set-alert-for-grafana-graph-after-every-four-hours-on-slack` –  Jan 27 '19 at 06:16