health_alarm_notify.conf 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873
  1. # Configuration for alarm notifications
  2. #
  3. # This configuration is used by: alarm-notify.sh
  4. # changes take effect immediately (the next alarm will use them).
  5. #
  6. # alarm-notify.sh can send:
  7. # - e-mails (using the sendmail command),
  8. # - push notifications to your mobile phone (pushover.net),
  9. # - messages to your slack team (slack.com),
  10. # - messages to your alerta server (alerta.io),
  11. # - messages to your flock team (flock.com),
  12. # - messages to your discord guild (discordapp.com),
  13. # - messages to your telegram chat / group chat (telegram.org)
  14. # - sms messages to your cell phone or any sms enabled device (twilio.com)
  15. # - sms messages to your cell phone or any sms enabled device (messagebird.com)
  16. # - notifications to users on pagerduty.com
  17. # - messages to your irc channel on your selected network
  18. # - messages to a local or remote syslog daemon
  19. #
  20. # The 'to' line given at netdata alarms defines a *role*, so that many
  21. # people can be notified for each role.
  22. #
  23. # This file is a BASH script itself.
  24. #
  25. #
  26. #------------------------------------------------------------------------------
  27. # proxy configuration
  28. #
  29. # If you need to send curl based notifications (pushover, pushbullet, slack, alerta,
  30. # flock, discord, telegram) via a proxy, set these to your proxy address:
  31. #export http_proxy="http://10.0.0.1:3128/"
  32. #export https_proxy="http://10.0.0.1:3128/"
  33. #------------------------------------------------------------------------------
  34. # notifications images
  35. #
  36. # Images in notifications need to be downloaded from an Internet facing site.
  37. # To allow notification providers fetch the icons/images, by default we set
  38. # the URL of the global public netdata registry.
  39. # If you have an Internet facing netdata (or you have copied the images/ folder
  40. # of netdata to your web server), set its URL here, to fetch the notification
  41. # images from it.
  42. #images_base_url="http://my.public.netdata.server:19999"
  43. #------------------------------------------------------------------------------
  44. # date handling
  45. #
  46. # You can configure netdata alerts to send dates in any format you want.
  47. # This uses standard `date` command format strings. See `man date` for
  48. # more info on what you can put in here. Note that this has to start with a '+', otherwise it won't work.
  49. #
  50. # For ISO 8601 dates, use '+%FT%T%z'
  51. # For RFC 5322 dates, use '+%a, %d %b %Y %H:%M:%S %z'
  52. # For RFC 3339 dates, use '+%F %T%:z'
  53. # For RFC 1123 dates, use '+%a, %d %b %Y %H:%M:%S %Z'
  54. # For RFC 1036 dates, use '+%A, %d-%b-%y %H:%M:%S %Z'
  55. # For a reasonably local date and time (in that order), use '+%x %X'
  56. # For the old default behavior (compatible with ANSI C's asctime() function), leave this empty.
  57. date_format=''
  58. #------------------------------------------------------------------------------
  59. # external commands
  60. # The full path to the sendmail command.
  61. # If empty, the system $PATH will be searched for it.
  62. # If not found, email notifications will be disabled (silently).
  63. sendmail=""
  64. # The full path of the curl command.
  65. # If empty, the system $PATH will be searched for it.
  66. # If not found, most notifications will be silently disabled.
  67. curl=""
  68. # The full path of the nc command.
  69. # If empty, the system $PATH will be searched for it.
  70. # If not found, irc notifications will be silently disabled.
  71. nc=""
  72. # The full path of the logger command.
  73. # If empty, the system $PATH will be searched for it.
  74. # If not found, syslog notifications will be silently disabled.
  75. logger=""
  76. #------------------------------------------------------------------------------
  77. # extra options for external commands
  78. #
  79. # In some cases, you may need to change what options get passed to an
  80. # external command. Such cases are covered here.
  81. # Extra options to pass to curl. In most cases, you shouldn't need to add anything
  82. # to this. If you're having issues with HTTPS connections, you might try adding
  83. # '--insecure' here, but be warned that it will make it much easier for
  84. # third-parties to block notification delivery, and may allow disclosure
  85. # of potentially sensitive information.
  86. #curl_options="--insecure"
  87. # Extra options to pass to logger. You shouldn't have to specify anything
  88. # here in most cases.
  89. #logger_options=""
  90. #------------------------------------------------------------------------------
  91. # NOTE ABOUT RECIPIENTS
  92. #
  93. # When you define recipients (all types):
  94. #
  95. # - emails addresses
  96. # - pushover user tokens
  97. # - telegram chat ids
  98. # - slack channels
  99. # - alerta environment
  100. # - flock rooms
  101. # - discord channels
  102. # - hipchat rooms
  103. # - sms phone numbers
  104. # - pagerduty.com (pd) services
  105. # - irc channels
  106. #
  107. # You can append |critical to limit the notifications to be sent.
  108. #
  109. # In these examples, the first recipient receives all the alarms
  110. # while the second one receives only the critical ones:
  111. #
  112. # email : "user1@example.com user2@example.com|critical"
  113. # pushover : "2987343...9437837 8756278...2362736|critical"
  114. # telegram : "111827421 112746832|critical"
  115. # slack : "alarms disasters|critical"
  116. # alerta : "alarms disasters|critical"
  117. # flock : "alarms disasters|critical"
  118. # discord : "alarms disasters|critical"
  119. # twilio : "+15555555555 +17777777777|critical"
  120. # messagebird: "+15555555555 +17777777777|critical"
  121. # kavenegar : "09155555555 09177777777|critical"
  122. # pd : "<pd_service_key_1> <pd_service_key_2>|critical"
  123. # irc : "<irc_channel_1> <irc_channel_2>|critical"
  124. #
  125. # If a recipient is set to empty string, the default recipient of the given
  126. # notification method (email, pushover, telegram, slack, alerta, etc) will be used.
  127. # To disable a notification, use the recipient called: disabled
  128. # This works for all notification methods (including the default recipients).
  129. #------------------------------------------------------------------------------
  130. # email global notification options
  131. # multiple recipients can be given like this:
  132. # "admin1@example.com admin2@example.com ..."
  133. # the email address sending email notifications
  134. # the default is the system user netdata runs as (usually: netdata)
  135. # The following formats are supported:
  136. # EMAIL_SENDER="user@domain"
  137. # EMAIL_SENDER="User Name <user@domain>"
  138. # EMAIL_SENDER="'User Name' <user@domain>"
  139. # EMAIL_SENDER="\"User Name\" <user@domain>"
  140. EMAIL_SENDER=""
  141. # enable/disable sending emails
  142. SEND_EMAIL="YES"
  143. # if a role recipient is not configured, an email will be send to:
  144. DEFAULT_RECIPIENT_EMAIL="root"
  145. # to receive only critical alarms, set it to "root|critical"
  146. # Optionally specify the encoding to list in the Content-Type header.
  147. # This doesn't change what encoding the e-mail is sent with, just what
  148. # the headers say it was encoded as.
  149. # This shouldn't need to be changed as it will almost always be
  150. # autodetected from the environment.
  151. #EMAIL_CHARSET="UTF-8"
  152. # You can also have netdata add headers to the message that will
  153. # cause most e-mail clients to treat all notifications for a given
  154. # chart+alarm+host combination as a single thread. This can help
  155. # simplify tracking of alarms, as it provides an easy wway for scripts
  156. # to corelate messages and also will cause most clients to group all the
  157. # messages together. THis is off by default.
  158. #EMAIL_THREADING="YES"
  159. #------------------------------------------------------------------------------
  160. # pushover (pushover.net) global notification options
  161. # multiple recipients can be given like this:
  162. # "USERTOKEN1 USERTOKEN2 ..."
  163. # enable/disable sending pushover notifications
  164. SEND_PUSHOVER="YES"
  165. # Login to pushover.net to get your pushover app token.
  166. # You need only one for all your netdata servers (or you can have one for
  167. # each of your netdata - your call).
  168. # Without an app token, netdata cannot send pushover notifications.
  169. PUSHOVER_APP_TOKEN=""
  170. # if a role's recipients are not configured, a notification will be send to
  171. # this pushover user token (empty = do not send a notification for unconfigured
  172. # roles):
  173. DEFAULT_RECIPIENT_PUSHOVER=""
  174. #------------------------------------------------------------------------------
  175. # pushbullet (pushbullet.com) push notification options
  176. # multiple recipients can be given like this:
  177. # "user1@email.com user2@mail.com"
  178. # enable/disable sending pushbullet notifications
  179. SEND_PUSHBULLET="YES"
  180. # Signup and Login to pushbullet.com
  181. # To get your Access Token, go to https://www.pushbullet.com/#settings/account
  182. # Create a new access token and paste it below.
  183. # Then just set the recipients' emails.
  184. # Please note that the if the email in the DEFAULT_RECIPIENT_PUSHBULLET does
  185. # not have a pushbullet account, the pushbullet service will send an email
  186. # to that address instead.
  187. # Without an access token, netdata cannot send pushbullet notifications.
  188. PUSHBULLET_ACCESS_TOKEN=""
  189. DEFAULT_RECIPIENT_PUSHBULLET=""
  190. # Device iden of the sending device. Optional.
  191. PUSHBULLET_SOURCE_DEVICE=""
  192. #------------------------------------------------------------------------------
  193. # Twilio (twilio.com) SMS options
  194. # multiple recipients can be given like this:
  195. # "+15555555555 +17777777777"
  196. # enable/disable sending twilio SMS
  197. SEND_TWILIO="YES"
  198. # Signup for free trial and select a SMS capable Twilio Number
  199. # To get your Account SID and Token, go to https://www.twilio.com/console
  200. # Place your sid, token and number below.
  201. # Then just set the recipients' phone numbers.
  202. # The trial account is only allowed to use the number specified when set up.
  203. # Without an account sid and token, netdata cannot send Twilio text messages.
  204. TWILIO_ACCOUNT_SID=""
  205. TWILIO_ACCOUNT_TOKEN=""
  206. TWILIO_NUMBER=""
  207. DEFAULT_RECIPIENT_TWILIO=""
  208. #------------------------------------------------------------------------------
  209. # Messagebird (messagebird.com) SMS options
  210. # multiple recipients can be given like this:
  211. # "+15555555555 +17777777777"
  212. # enable/disable sending messagebird SMS
  213. SEND_MESSAGEBIRD="YES"
  214. # to get an access key, create a free account at https://www.messagebird.com
  215. # verify and activate the account (no CC info needed)
  216. # login to your account and enter your phonenumber to get some free credits
  217. # to get the API key, click on 'API' in the sidebar, then 'API Access (REST)'
  218. # click 'Add access key' and fill in data (you want a live key to send SMS)
  219. # Without an access key, netdata cannot send Messagebird text messages.
  220. MESSAGEBIRD_ACCESS_KEY=""
  221. MESSAGEBIRD_NUMBER=""
  222. DEFAULT_RECIPIENT_MESSAGEBIRD=""
  223. #------------------------------------------------------------------------------
  224. # Kavenegar (Kavenegar.com) SMS options
  225. # multiple recipients can be given like this:
  226. # "09155555555 09177777777"
  227. # enable/disable sending kavenegar SMS
  228. SEND_KAVENEGAR="YES"
  229. # to get an access key, after selecting and purchasing your desired service
  230. # at http://kavenegar.com/pricing.html
  231. # login to your account, go to your dashboard and my account are
  232. # https://panel.kavenegar.com/Client/setting/account from API Key
  233. # copy your api key. You can generate new API Key too.
  234. # You can find and select kevenegar sender number from this place.
  235. # Without an API key, netdata cannot send KAVENEGAR text messages.
  236. KAVENEGAR_API_KEY=""
  237. KAVENEGAR_SENDER=""
  238. DEFAULT_RECIPIENT_KAVENEGAR=""
  239. #------------------------------------------------------------------------------
  240. # telegram (telegram.org) global notification options
  241. # To get your chat ID send the command /my_id to telegram bot @get_id.
  242. # Users also need to open a query with the bot (see below).
  243. # note: multiple recipients can be given like this:
  244. # "CHAT_ID_1 CHAT_ID_2 ..."
  245. # enable/disable sending telegram messages
  246. SEND_TELEGRAM="YES"
  247. # Contact the bot @BotFather to create a new bot and receive a bot token.
  248. # Without it, netdata cannot send telegram messages.
  249. TELEGRAM_BOT_TOKEN=""
  250. # If a role's recipients are not configured, a message will be send to
  251. # this chat id (empty = do not send a notification for unconfigured roles):
  252. DEFAULT_RECIPIENT_TELEGRAM=""
  253. #------------------------------------------------------------------------------
  254. # slack (slack.com) global notification options
  255. # multiple recipients can be given like this:
  256. # "CHANNEL1 CHANNEL2 ..."
  257. # enable/disable sending slack notifications
  258. SEND_SLACK="YES"
  259. # Login to slack.com and create an incoming webhook. You need only one for all
  260. # your netdata servers (or you can have one for each of your netdata).
  261. # Without it, netdata cannot send slack notifications.
  262. # Get yours from: https://api.slack.com/incoming-webhooks
  263. SLACK_WEBHOOK_URL=""
  264. # if a role's recipients are not configured, a notification will be send to
  265. # this slack channel (empty = do not send a notification for unconfigured
  266. # roles):
  267. DEFAULT_RECIPIENT_SLACK=""
  268. #------------------------------------------------------------------------------
  269. # rocketchat (rocket.chat) global notification options
  270. # multiple recipients can be given like this:
  271. # "CHANNEL1 CHANNEL2 ..."
  272. # enable/disable sending rocketchat notifications
  273. SEND_ROCKETCHAT="YES"
  274. # Login to rocket.chat and create an incoming webhook. You need only one for all
  275. # your netdata servers (or you can have one for each of your netdata).
  276. # Without it, netdata cannot send rocketchat notifications.
  277. ROCKETCHAT_WEBHOOK_URL=""
  278. # if a role's recipients are not configured, a notification will be send to
  279. # this rocketchat channel (empty = do not send a notification for unconfigured
  280. # roles):
  281. DEFAULT_RECIPIENT_ROCKETCHAT=""
  282. #------------------------------------------------------------------------------
  283. # alerta (alerta.io) global notification options
  284. # multiple recipients (Environments) can be given like this:
  285. # "Production Development ..."
  286. # enable/disable sending alerta notifications
  287. SEND_ALERTA="YES"
  288. # here set your alerta server API url
  289. # this is the API url you defined when installed Alerta server,
  290. # it is the same for all users. Do not include last slash.
  291. # ALERTA_WEBHOOK_URL="https://<server>/alerta/api"
  292. ALERTA_WEBHOOK_URL=""
  293. # Login with an administrative user to you Alerta server and create an API KEY
  294. # with write permissions.
  295. ALERTA_API_KEY=""
  296. # you can define environments in /etc/alertad.conf option ALLOWED_ENVIRONMENTS
  297. # standard environments are Production and Development
  298. # if a role's recipients are not configured, a notification will be send to
  299. # this Environment (empty = do not send a notification for unconfigured roles):
  300. DEFAULT_RECIPIENT_ALERTA=""
  301. #------------------------------------------------------------------------------
  302. # flock (flock.com) global notification options
  303. # enable/disable sending flock notifications
  304. SEND_FLOCK="YES"
  305. # Login to flock.com and create an incoming webhook. You need only one for all
  306. # your netdata servers (or you can have one for each of your netdata).
  307. # Without it, netdata cannot send flock notifications.
  308. FLOCK_WEBHOOK_URL=""
  309. # if a role recipient is not configured, no notification will be sent
  310. DEFAULT_RECIPIENT_FLOCK=""
  311. #------------------------------------------------------------------------------
  312. # discord (discordapp.com) global notification options
  313. # multiple recipients can be given like this:
  314. # "CHANNEL1 CHANNEL2 ..."
  315. # enable/disable sending discord notifications
  316. SEND_DISCORD="YES"
  317. # Create a webhook by following the official documentation -
  318. # https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks
  319. DISCORD_WEBHOOK_URL=""
  320. # if a role's recipients are not configured, a notification will be send to
  321. # this discord channel (empty = do not send a notification for unconfigured
  322. # roles):
  323. DEFAULT_RECIPIENT_DISCORD=""
  324. #------------------------------------------------------------------------------
  325. # hipchat global notification options
  326. # multiple recipients can be given like this:
  327. # "ROOM1 ROOM2 ..."
  328. # enable/disable sending hipchat notifications
  329. SEND_HIPCHAT="YES"
  330. # define hipchat server
  331. HIPCHAT_SERVER="api.hipchat.com"
  332. # api.hipchat.com authorization token
  333. # Without this, netdata cannot send hipchat notifications.
  334. HIPCHAT_AUTH_TOKEN=""
  335. # if a role's recipients are not configured, a notification will be send to
  336. # this hipchat room (empty = do not send a notification for unconfigured
  337. # roles):
  338. DEFAULT_RECIPIENT_HIPCHAT=""
  339. #------------------------------------------------------------------------------
  340. # kafka notification options
  341. # enable/disable sending kafka notifications
  342. SEND_KAFKA="YES"
  343. # The URL to POST kafka alarm data to. It should be the full URL.
  344. KAFKA_URL=""
  345. # The IP to be used in the kafka message as the sender.
  346. KAFKA_SENDER_IP=""
  347. #------------------------------------------------------------------------------
  348. # pagerduty.com notification options
  349. #
  350. # pagerduty.com notifications require the pagerduty agent to be installed and
  351. # a "Generic API" pagerduty service.
  352. # https://www.pagerduty.com/docs/guides/agent-install-guide/
  353. # multiple recipients can be given like this:
  354. # "<pd_service_key_1> <pd_service_key_2> ..."
  355. # enable/disable sending pagerduty notifications
  356. SEND_PD="YES"
  357. # if a role's recipients are not configured, a notification will be sent to
  358. # the "General API" pagerduty.com service that uses this service key.
  359. # (empty = do not send a notification for unconfigured roles):
  360. DEFAULT_RECIPIENT_PD=""
  361. #------------------------------------------------------------------------------
  362. # fleep notification options
  363. #
  364. # To send fleep.io notifications, you will need a webhook for the
  365. # conversation you want to send to.
  366. # Fleep recipients are specified as the last part of the webhook URL.
  367. # So, for a webhook URL of: https://fleep.io/hook/IJONmBuuSlWlkb_ttqyXJg, the
  368. # recipient name would be: 'IJONmBuuSlWlkb_ttqyXJg'.
  369. # enable/disable sending fleep notifications
  370. SEND_FLEEP="YES"
  371. # if a role's recipients are not configured, a notification will not be sent.
  372. # (empty = do not send a notification for unconfigured roles):
  373. DEFAULT_RECIPIENT_FLEEP=""
  374. # The user name to label the messages with. If this is unset,
  375. # the hostname of the system the notification is for will be used.
  376. FLEEP_SENDER=""
  377. #------------------------------------------------------------------------------
  378. # irc notification options
  379. #
  380. # irc notifications require only the nc utility to be installed.
  381. # multiple recipients can be given like this:
  382. # "<irc_channel_1> <irc_channel_2> ..."
  383. # enable/disable sending irc notifications
  384. SEND_IRC="YES"
  385. # if a role's recipients are not configured, a notification will not be sent.
  386. # (empty = do not send a notification for unconfigured roles):
  387. DEFAULT_RECIPIENT_IRC=""
  388. # The irc network to which the recipients belong. It must be the full network.
  389. # e.g. "irc.freenode.net"
  390. IRC_NETWORK=""
  391. # The irc nickname which is required to send the notification. It must not be
  392. # an already registered name as the connection's MODE is defined as a 'guest'.
  393. IRC_NICKNAME=""
  394. # The irc realname which is required in order to make the connection and is an
  395. # extra identifier.
  396. IRC_REALNAME=""
  397. #------------------------------------------------------------------------------
  398. # syslog notifications
  399. #
  400. # syslog notifications only need you to have a working logger command, which
  401. # should be the case on pretty much any Linux system.
  402. # enable/disable sending syslog notifications
  403. # NOTE: make sure you have everything else configured the way you want
  404. # it _before_ turning this on.
  405. SEND_SYSLOG="NO"
  406. # A note on log levels and facilities:
  407. #
  408. # The traditional UNIX syslog mechanism has the concept of both log
  409. # levels and facilities. A log level indicates the relaitve severity of
  410. # the message, while a facility specifies a generic source for the message
  411. # (for example, the `mail` facility is where sendmail and postfix log
  412. # their messages). All major syslog daemons have the ability to filter
  413. # messages based on both log level and facility, and can often also make
  414. # routing decisions for messages based on both factors.
  415. #
  416. # On Linux, the eight log levels in decreasing order of severity are:
  417. # emerg, alert, crit, err, warning, notice, info, debug
  418. #
  419. # By default, warnings will be logged at the warning level, critical
  420. # alerts at the crit level, and clear notifications at the invo level.
  421. #
  422. # And the 19 facilities you can log to are:
  423. # auth, authpriv, cron, daemon, ftp, lpr, mail, news, syslog, user,
  424. # uucp, local0, local1, local2, local3, local4, local5, local6, and local7
  425. #
  426. # By default, netdata alerts will be logged to the local6 facility.
  427. #
  428. # Depending on your distribution, this means that either all your
  429. # netdata alerts will by default end up in the main system log (usually
  430. # /var/log/messages), or they won't be logged to a file at all.
  431. # Neither of these are likely to be what you actually want, but any
  432. # configuration to change that needs to happen in the syslog daemon
  433. # configuration, not here.
  434. # This controls which facility is used by defalt for logging. Defaults
  435. # to local6.
  436. SYSLOG_FACILITY=''
  437. # If a role's recipients are not configured, use the following.
  438. # (empty = do not send a notification for unconfigured roles)
  439. #
  440. # The recipient format for syslog uses the following format:
  441. # [[facility.level][@host[:port]]/]prefix
  442. #
  443. # `prefix` gets appended to the front of all log messages generated for
  444. # that recipient. The prefix is mandatory.
  445. # 'host' and 'port' can be used to specify a remote syslog server to
  446. # send messages to. Leave these out if you want messages to be delivered
  447. # locally. 'host' can be either a hostname or an IP address.
  448. # IPv6 addresses must have square around them.
  449. # 'facility' and 'level' are used to override the default logging facility
  450. # set above and the log level. If one is specified, both must be present.
  451. #
  452. # For example, to send messages with a 'netdata' prefix to a syslog
  453. # daemon listening on port 514 on 'loghost' using the daemon facility and
  454. # notice log level:
  455. # DEFAULT_RECIPIENT_SYSLOG='daemon.notice@loghost:514/netdata'
  456. #
  457. DEFAULT_RECIPIENT_SYSLOG="netdata"
  458. #------------------------------------------------------------------------------
  459. # custom notifications
  460. #
  461. # enable/disable sending custom notifications
  462. SEND_CUSTOM="YES"
  463. # if a role's recipients are not configured, use the following.
  464. # (empty = do not send a notification for unconfigured roles)
  465. DEFAULT_RECIPIENT_CUSTOM=""
  466. # The custom_sender() is a custom function to do whatever you need to do
  467. custom_sender() {
  468. # variables you can use:
  469. # ${host} the host generated this event
  470. # ${url_host} same as ${host} but URL encoded
  471. # ${unique_id} the unique id of this event
  472. # ${alarm_id} the unique id of the alarm that generated this event
  473. # ${event_id} the incremental id of the event, for this alarm id
  474. # ${when} the timestamp this event occurred
  475. # ${name} the name of the alarm, as given in netdata health.d entries
  476. # ${url_name} same as ${name} but URL encoded
  477. # ${chart} the name of the chart (type.id)
  478. # ${url_chart} same as ${chart} but URL encoded
  479. # ${family} the family of the chart
  480. # ${url_family} same as ${family} but URL encoded
  481. # ${status} the current status : REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL
  482. # ${old_status} the previous status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL
  483. # ${value} the current value of the alarm
  484. # ${old_value} the previous value of the alarm
  485. # ${src} the line number and file the alarm has been configured
  486. # ${duration} the duration in seconds of the previous alarm state
  487. # ${duration_txt} same as ${duration} for humans
  488. # ${non_clear_duration} the total duration in seconds this is/was non-clear
  489. # ${non_clear_duration_txt} same as ${non_clear_duration} for humans
  490. # ${units} the units of the value
  491. # ${info} a short description of the alarm
  492. # ${value_string} friendly value (with units)
  493. # ${old_value_string} friendly old value (with units)
  494. # ${image} the URL of an image to represent the status of the alarm
  495. # ${color} a color in #AABBCC format for the alarm
  496. # ${goto_url} the URL the user can click to see the netdata dashboard
  497. # these are more human friendly:
  498. # ${alarm} like "name = value units"
  499. # ${status_message} like "needs attention", "recovered", "is critical"
  500. # ${severity} like "Escalated to CRITICAL", "Recovered from WARNING"
  501. # ${raised_for} like "(alarm was raised for 10 minutes)"
  502. # example human readable SMS
  503. local msg="${host} ${status_message}: ${alarm} ${raised_for}"
  504. # limit it to 160 characters and encode it for use in a URL
  505. urlencode "${msg:0:160}" >/dev/null; msg="${REPLY}"
  506. # a space separated list of the recipients to send alarms to
  507. to="${1}"
  508. info "not sending custom notification to ${to}, for ${status} of '${host}.${chart}.${name}' - custom_sender() is not configured."
  509. }
  510. ###############################################################################
  511. # RECIPIENTS PER ROLE
  512. # -----------------------------------------------------------------------------
  513. # generic system alarms
  514. # CPU, disks, network interfaces, entropy, etc
  515. role_recipients_email[sysadmin]="${DEFAULT_RECIPIENT_EMAIL}"
  516. role_recipients_pushover[sysadmin]="${DEFAULT_RECIPIENT_PUSHOVER}"
  517. role_recipients_pushbullet[sysadmin]="${DEFAULT_RECIPIENT_PUSHBULLET}"
  518. role_recipients_telegram[sysadmin]="${DEFAULT_RECIPIENT_TELEGRAM}"
  519. role_recipients_slack[sysadmin]="${DEFAULT_RECIPIENT_SLACK}"
  520. role_recipients_alerta[sysadmin]="${DEFAULT_RECIPIENT_ALERTA}"
  521. role_recipients_flock[sysadmin]="${DEFAULT_RECIPIENT_FLOCK}"
  522. role_recipients_discord[sysadmin]="${DEFAULT_RECIPIENT_DISCORD}"
  523. role_recipients_hipchat[sysadmin]="${DEFAULT_RECIPIENT_HIPCHAT}"
  524. role_recipients_twilio[sysadmin]="${DEFAULT_RECIPIENT_TWILIO}"
  525. role_recipients_messagebird[sysadmin]="${DEFAULT_RECIPIENT_MESSAGEBIRD}"
  526. role_recipients_kavenegar[sysadmin]="${DEFAULT_RECIPIENT_KAVENEGAR}"
  527. role_recipients_pd[sysadmin]="${DEFAULT_RECIPIENT_PD}"
  528. role_recipients_fleep[sysadmin]="${DEFAULT_RECIPIENT_FLEEP}"
  529. role_recipients_irc[sysadmin]="${DEFAULT_RECIPIENT_IRC}"
  530. role_recipients_syslog[sysadmin]="${DEFAULT_RECIPIENT_SYSLOG}"
  531. role_recipients_custom[sysadmin]="${DEFAULT_RECIPIENT_CUSTOM}"
  532. # -----------------------------------------------------------------------------
  533. # DNS related alarms
  534. role_recipients_email[domainadmin]="${DEFAULT_RECIPIENT_EMAIL}"
  535. role_recipients_pushover[domainadmin]="${DEFAULT_RECIPIENT_PUSHOVER}"
  536. role_recipients_pushbullet[domainadmin]="${DEFAULT_RECIPIENT_PUSHBULLET}"
  537. role_recipients_telegram[domainadmin]="${DEFAULT_RECIPIENT_TELEGRAM}"
  538. role_recipients_slack[domainadmin]="${DEFAULT_RECIPIENT_SLACK}"
  539. role_recipients_alerta[domainadmin]="${DEFAULT_RECIPIENT_ALERTA}"
  540. role_recipients_flock[domainadmin]="${DEFAULT_RECIPIENT_FLOCK}"
  541. role_recipients_discord[domainadmin]="${DEFAULT_RECIPIENT_DISCORD}"
  542. role_recipients_hipchat[domainadmin]="${DEFAULT_RECIPIENT_HIPCHAT}"
  543. role_recipients_twilio[domainadmin]="${DEFAULT_RECIPIENT_TWILIO}"
  544. role_recipients_messagebird[domainadmin]="${DEFAULT_RECIPIENT_MESSAGEBIRD}"
  545. role_recipients_kavenegar[domainadmin]="${DEFAULT_RECIPIENT_KAVENEGAR}"
  546. role_recipients_pd[domainadmin]="${DEFAULT_RECIPIENT_PD}"
  547. role_recipients_fleep[domainadmin]="${DEFAULT_RECIPIENT_FLEEP}"
  548. role_recipients_irc[domainadmin]="${DEFAULT_RECIPIENT_IRC}"
  549. role_recipients_syslog[domainadmin]="${DEFAULT_RECIPIENT_SYSLOG}"
  550. role_recipients_custom[domainadmin]="${DEFAULT_RECIPIENT_CUSTOM}"
  551. # -----------------------------------------------------------------------------
  552. # database servers alarms
  553. # mysql, redis, memcached, postgres, etc
  554. role_recipients_email[dba]="${DEFAULT_RECIPIENT_EMAIL}"
  555. role_recipients_pushover[dba]="${DEFAULT_RECIPIENT_PUSHOVER}"
  556. role_recipients_pushbullet[dba]="${DEFAULT_RECIPIENT_PUSHBULLET}"
  557. role_recipients_telegram[dba]="${DEFAULT_RECIPIENT_TELEGRAM}"
  558. role_recipients_slack[dba]="${DEFAULT_RECIPIENT_SLACK}"
  559. role_recipients_alerta[dba]="${DEFAULT_RECIPIENT_ALERTA}"
  560. role_recipients_flock[dba]="${DEFAULT_RECIPIENT_FLOCK}"
  561. role_recipients_discord[dba]="${DEFAULT_RECIPIENT_DISCORD}"
  562. role_recipients_hipchat[dba]="${DEFAULT_RECIPIENT_HIPCHAT}"
  563. role_recipients_twilio[dba]="${DEFAULT_RECIPIENT_TWILIO}"
  564. role_recipients_messagebird[dba]="${DEFAULT_RECIPIENT_MESSAGEBIRD}"
  565. role_recipients_kavenegar[dba]="${DEFAULT_RECIPIENT_KAVENEGAR}"
  566. role_recipients_pd[dba]="${DEFAULT_RECIPIENT_PD}"
  567. role_recipients_fleep[dba]="${DEFAULT_RECIPIENT_FLEEP}"
  568. role_recipients_irc[dba]="${DEFAULT_RECIPIENT_IRC}"
  569. role_recipients_syslog[dba]="${DEFAULT_RECIPIENT_SYSLOG}"
  570. role_recipients_custom[dba]="${DEFAULT_RECIPIENT_CUSTOM}"
  571. # -----------------------------------------------------------------------------
  572. # web servers alarms
  573. # apache, nginx, lighttpd, etc
  574. role_recipients_email[webmaster]="${DEFAULT_RECIPIENT_EMAIL}"
  575. role_recipients_pushover[webmaster]="${DEFAULT_RECIPIENT_PUSHOVER}"
  576. role_recipients_pushbullet[webmaster]="${DEFAULT_RECIPIENT_PUSHBULLET}"
  577. role_recipients_telegram[webmaster]="${DEFAULT_RECIPIENT_TELEGRAM}"
  578. role_recipients_slack[webmaster]="${DEFAULT_RECIPIENT_SLACK}"
  579. role_recipients_alerta[webmaster]="${DEFAULT_RECIPIENT_ALERTA}"
  580. role_recipients_flock[webmaster]="${DEFAULT_RECIPIENT_FLOCK}"
  581. role_recipients_discord[webmaster]="${DEFAULT_RECIPIENT_DISCORD}"
  582. role_recipients_hipchat[webmaster]="${DEFAULT_RECIPIENT_HIPCHAT}"
  583. role_recipients_twilio[webmaster]="${DEFAULT_RECIPIENT_TWILIO}"
  584. role_recipients_messagebird[webmaster]="${DEFAULT_RECIPIENT_MESSAGEBIRD}"
  585. role_recipients_kavenegar[webmaster]="${DEFAULT_RECIPIENT_KAVENEGAR}"
  586. role_recipients_pd[webmaster]="${DEFAULT_RECIPIENT_PD}"
  587. role_recipients_fleep[webmaster]="${DEFAULT_RECIPIENT_FLEEP}"
  588. role_recipients_irc[webmaster]="${DEFAULT_RECIPIENT_IRC}"
  589. role_recipients_syslog[webmaster]="${DEFAULT_RECIPIENT_SYSLOG}"
  590. role_recipients_custom[webmaster]="${DEFAULT_RECIPIENT_CUSTOM}"
  591. # -----------------------------------------------------------------------------
  592. # proxy servers alarms
  593. # squid, etc
  594. role_recipients_email[proxyadmin]="${DEFAULT_RECIPIENT_EMAIL}"
  595. role_recipients_pushover[proxyadmin]="${DEFAULT_RECIPIENT_PUSHOVER}"
  596. role_recipients_pushbullet[proxyadmin]="${DEFAULT_RECIPIENT_PUSHBULLET}"
  597. role_recipients_telegram[proxyadmin]="${DEFAULT_RECIPIENT_TELEGRAM}"
  598. role_recipients_slack[proxyadmin]="${DEFAULT_RECIPIENT_SLACK}"
  599. role_recipients_alerta[proxyadmin]="${DEFAULT_RECIPIENT_ALERTA}"
  600. role_recipients_flock[proxyadmin]="${DEFAULT_RECIPIENT_FLOCK}"
  601. role_recipients_discord[proxyadmin]="${DEFAULT_RECIPIENT_DISCORD}"
  602. role_recipients_hipchat[proxyadmin]="${DEFAULT_RECIPIENT_HIPCHAT}"
  603. role_recipients_twilio[proxyadmin]="${DEFAULT_RECIPIENT_TWILIO}"
  604. role_recipients_messagebird[proxyadmin]="${DEFAULT_RECIPIENT_MESSAGEBIRD}"
  605. role_recipients_kavenegar[proxyadmin]="${DEFAULT_RECIPIENT_KAVENEGAR}"
  606. role_recipients_pd[proxyadmin]="${DEFAULT_RECIPIENT_PD}"
  607. role_recipients_fleep[proxyadmin]="${DEFAULT_RECIPIENT_FLEEP}"
  608. role_recipients_irc[proxyadmin]="${DEFAULT_RECIPIENT_IRC}"
  609. role_recipients_syslog[proxyadmin]="${DEFAULT_RECIPIENT_SYSLOG}"
  610. role_recipients_custom[proxyadmin]="${DEFAULT_RECIPIENT_CUSTOM}"
  611. # -----------------------------------------------------------------------------
  612. # peripheral devices
  613. # UPS, photovoltaics, etc
  614. role_recipients_email[sitemgr]="${DEFAULT_RECIPIENT_EMAIL}"
  615. role_recipients_pushover[sitemgr]="${DEFAULT_RECIPIENT_PUSHOVER}"
  616. role_recipients_pushbullet[sitemgr]="${DEFAULT_RECIPIENT_PUSHBULLET}"
  617. role_recipients_telegram[sitemgr]="${DEFAULT_RECIPIENT_TELEGRAM}"
  618. role_recipients_slack[sitemgr]="${DEFAULT_RECIPIENT_SLACK}"
  619. role_recipients_alerta[sitemgr]="${DEFAULT_RECIPIENT_ALERTA}"
  620. role_recipients_flock[sitemgr]="${DEFAULT_RECIPIENT_FLOCK}"
  621. role_recipients_discord[sitemgr]="${DEFAULT_RECIPIENT_DISCORD}"
  622. role_recipients_hipchat[sitemgr]="${DEFAULT_RECIPIENT_HIPCHAT}"
  623. role_recipients_twilio[sitemgr]="${DEFAULT_RECIPIENT_TWILIO}"
  624. role_recipients_messagebird[sitemgr]="${DEFAULT_RECIPIENT_MESSAGEBIRD}"
  625. role_recipients_kavenegar[sitemgr]="${DEFAULT_RECIPIENT_KAVENEGAR}"
  626. role_recipients_pd[sitemgr]="${DEFAULT_RECIPIENT_PD}"
  627. role_recipients_fleep[sitemgr]="${DEFAULT_RECIPIENT_FLEEP}"
  628. role_recipients_syslog[sitemgr]="${DEFAULT_RECIPIENT_SYSLOG}"
  629. role_recipients_custom[sitemgr]="${DEFAULT_RECIPIENT_CUSTOM}"