last day (17 days later) » 

4:45 PM
1
A: How to use Grafana alerts for auto remedy

Daniel LeeOne of the alert notification types is a custom webhook. It sends a JSON document with the alert notification details to a custom endpoint that you can define yourself:

 
This works for me, documentation for grafana is not friendly at all.
 
@AtmeshMishra if something is missing or confusing, please open an issue on GitHub - or even better send a PR with friendlier documentation for this feature :-)
 
Sure, but first Ill have to learn this completely.
I used the webhook, it sends ruleURL in JSON body. Where should I change it? Should I change in grafana.ini ??
 
It is based on the domain setting in the ini file: docs.grafana.org/alerting/notifications/…
 
I changed domain and root_url setting in grafana.ini. It is still showing localhost:3000.
 
4:45 PM
Did you restart Grafana after changing the ini?
 
Yes, I did restart server
 
If you go into the server settings (localhost:3000/admin/settings) and scroll down to the server section, do the settings look correct? What does the root_url setting look like?
 
5:16 PM
%(protocol)s://%(domain)s:%(http_port)s/
where is it reading this data from?
 
6:16 PM
And domain is set to the host name (not localhost)?
The url for the alert rule uses the root_url variable from the config. If root_url is not set then it defaults to localhost:3000.
Also, is that root_url correct when interpolated? So if protocol is http, domain is your_host and port is 3000 then the url would be http://your_host:3000.
 

  last day (17 days later) »