Netdata comes with hundreds of pre-configured alarms and templates. In addition
to that you can define your own by defining a dictionary called
netdata_custom_notifications on one or more hosts in your inventory.
1 2 3 4 5 6 7 8 910
-alarm:my_web_service_unreachable'on':httpcheck_Example_1.statuscalc:'($no_web_service_connections>=$web_service_timeouts)?($no_web_service_connections):($web_service_timeouts)'units:'%'every:10swarn:($no_web_service_connections >= 10 OR $web_service_timeouts >= 10) AND ($no_web_service_connections < 40 OR $web_service_timeouts < 40)crit:$no_web_service_connections >= 40 OR $web_service_timeouts >= 40delay:down 5m multiplier 1.5 max 1hinfo:average of failed requests either due to timeouts or no connection during the last 5 minutesto:customer
This example is a copy of the stock alarm web_service_unreachable which only
works on the HTTP check Example 1 and send the alerts to the role
customer.
Netdata comes with a number of predefined roles that can receive alarm
notifications relevant to them:
sysadmin
domainadmin
dba
webmaster
proxyadmin
sitemgr
When defining custom alarms you can use different strings which implicitly
defines new roles. To define individual role recipients, define the dictionary
netdata_role_recipients:
In this example, alarms for the role customer will be sent to Slack into the
#incident channel and by email to the 2 given email addresses, where the
second one only receives critical alarms.