Advertisement
Guest User

Untitled

a guest
Jan 24th, 2019
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 28.89 KB | None | 0 0
  1. bash -x /usr/libexec/netdata/plugins.d/alarm-notify.sh sysadmin miveterinario.es 1 1 1 1548349592 test_alarm test.chart test.family WARNING CLEAR 100 90 /usr/libexec/netdata/plugins.d/alarm-notify.sh 1 1 units 'this is a test alarm to verify notifications work' 'new value' 'old value' 'evaluated expression' 'expression variable values' 0 0
  2. + '[' '(' sysadmin = test -o miveterinario.es = test ')' -a 24 -le 2 ']'
  3. + export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin:/usr/sbin:/usr/local/sbin
  4. + PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin:/usr/sbin:/usr/local/sbin
  5. + export LC_ALL=C
  6. + LC_ALL=C
  7. ++ basename /usr/libexec/netdata/plugins.d/alarm-notify.sh
  8. + PROGRAM_NAME=alarm-notify.sh
  9. + debug=0
  10. + method_names='
  11. email
  12. pushover
  13. pushbullet
  14. telegram
  15. slack
  16. alerta
  17. flock
  18. discord
  19. hipchat
  20. twilio
  21. messagebird
  22. pd
  23. fleep
  24. syslog
  25. custom
  26. msteam
  27. kavenegar
  28. prowl
  29. '
  30. + '[' 4 -lt 4 ']'
  31. + '[' -z '' ']'
  32. + NETDATA_USER_CONFIG_DIR=/etc/netdata
  33. + '[' -z '' ']'
  34. + NETDATA_STOCK_CONFIG_DIR=/usr/lib/netdata/conf.d
  35. + '[' -z '' ']'
  36. + NETDATA_CACHE_DIR=/var/cache/netdata
  37. + '[' -z '' ']'
  38. + NETDATA_REGISTRY_URL=https://registry.my-netdata.io
  39. + '[' sysadmin = unittest ']'
  40. + roles=sysadmin
  41. + args_host=miveterinario.es
  42. + unique_id=1
  43. + alarm_id=1
  44. + event_id=1
  45. + when=1548349592
  46. + name=test_alarm
  47. + chart=test.chart
  48. + family=test.family
  49. + status=WARNING
  50. + old_status=CLEAR
  51. + value=100
  52. + old_value=90
  53. + src=/usr/libexec/netdata/plugins.d/alarm-notify.sh
  54. + duration=1
  55. + non_clear_duration=1
  56. + units=units
  57. + info='this is a test alarm to verify notifications work'
  58. + value_string='new value'
  59. + old_value_string='old value'
  60. + calc_expression='evaluated expression'
  61. + calc_param_values='expression variable values'
  62. + total_warnings=0
  63. + total_critical=0
  64. + '[' -z miveterinario.es ']'
  65. + host=miveterinario.es
  66. + '[' WARNING '!=' WARNING -a WARNING '!=' CRITICAL -a WARNING '!=' CLEAR ']'
  67. + '[' '' '!=' YES -a CLEAR '!=' WARNING -a CLEAR '!=' CRITICAL -a WARNING = CLEAR ']'
  68. + images_base_url=https://registry.my-netdata.io
  69. + curl_options=
  70. + use_fqdn=NO
  71. + curl=
  72. + sendmail=
  73. + for method_name in '${method_names^^}'
  74. + declare SEND_EMAIL=YES
  75. + declare DEFAULT_RECIPIENT_EMAIL
  76. + for method_name in '${method_names^^}'
  77. + declare SEND_PUSHOVER=YES
  78. + declare DEFAULT_RECIPIENT_PUSHOVER
  79. + for method_name in '${method_names^^}'
  80. + declare SEND_PUSHBULLET=YES
  81. + declare DEFAULT_RECIPIENT_PUSHBULLET
  82. + for method_name in '${method_names^^}'
  83. + declare SEND_TELEGRAM=YES
  84. + declare DEFAULT_RECIPIENT_TELEGRAM
  85. + for method_name in '${method_names^^}'
  86. + declare SEND_SLACK=YES
  87. + declare DEFAULT_RECIPIENT_SLACK
  88. + for method_name in '${method_names^^}'
  89. + declare SEND_ALERTA=YES
  90. + declare DEFAULT_RECIPIENT_ALERTA
  91. + for method_name in '${method_names^^}'
  92. + declare SEND_FLOCK=YES
  93. + declare DEFAULT_RECIPIENT_FLOCK
  94. + for method_name in '${method_names^^}'
  95. + declare SEND_DISCORD=YES
  96. + declare DEFAULT_RECIPIENT_DISCORD
  97. + for method_name in '${method_names^^}'
  98. + declare SEND_HIPCHAT=YES
  99. + declare DEFAULT_RECIPIENT_HIPCHAT
  100. + for method_name in '${method_names^^}'
  101. + declare SEND_TWILIO=YES
  102. + declare DEFAULT_RECIPIENT_TWILIO
  103. + for method_name in '${method_names^^}'
  104. + declare SEND_MESSAGEBIRD=YES
  105. + declare DEFAULT_RECIPIENT_MESSAGEBIRD
  106. + for method_name in '${method_names^^}'
  107. + declare SEND_PD=YES
  108. + declare DEFAULT_RECIPIENT_PD
  109. + for method_name in '${method_names^^}'
  110. + declare SEND_FLEEP=YES
  111. + declare DEFAULT_RECIPIENT_FLEEP
  112. + for method_name in '${method_names^^}'
  113. + declare SEND_SYSLOG=YES
  114. + declare DEFAULT_RECIPIENT_SYSLOG
  115. + for method_name in '${method_names^^}'
  116. + declare SEND_CUSTOM=YES
  117. + declare DEFAULT_RECIPIENT_CUSTOM
  118. + for method_name in '${method_names^^}'
  119. + declare SEND_MSTEAM=YES
  120. + declare DEFAULT_RECIPIENT_MSTEAM
  121. + for method_name in '${method_names^^}'
  122. + declare SEND_KAVENEGAR=YES
  123. + declare DEFAULT_RECIPIENT_KAVENEGAR
  124. + for method_name in '${method_names^^}'
  125. + declare SEND_PROWL=YES
  126. + declare DEFAULT_RECIPIENT_PROWL
  127. + for method_name in '${method_names}'
  128. + declare -A role_recipients_email
  129. + for method_name in '${method_names}'
  130. + declare -A role_recipients_pushover
  131. + for method_name in '${method_names}'
  132. + declare -A role_recipients_pushbullet
  133. + for method_name in '${method_names}'
  134. + declare -A role_recipients_telegram
  135. + for method_name in '${method_names}'
  136. + declare -A role_recipients_slack
  137. + for method_name in '${method_names}'
  138. + declare -A role_recipients_alerta
  139. + for method_name in '${method_names}'
  140. + declare -A role_recipients_flock
  141. + for method_name in '${method_names}'
  142. + declare -A role_recipients_discord
  143. + for method_name in '${method_names}'
  144. + declare -A role_recipients_hipchat
  145. + for method_name in '${method_names}'
  146. + declare -A role_recipients_twilio
  147. + for method_name in '${method_names}'
  148. + declare -A role_recipients_messagebird
  149. + for method_name in '${method_names}'
  150. + declare -A role_recipients_pd
  151. + for method_name in '${method_names}'
  152. + declare -A role_recipients_fleep
  153. + for method_name in '${method_names}'
  154. + declare -A role_recipients_syslog
  155. + for method_name in '${method_names}'
  156. + declare -A role_recipients_custom
  157. + for method_name in '${method_names}'
  158. + declare -A role_recipients_msteam
  159. + for method_name in '${method_names}'
  160. + declare -A role_recipients_kavenegar
  161. + for method_name in '${method_names}'
  162. + declare -A role_recipients_prowl
  163. + SEND_SLACK=YES
  164. + SEND_MSTEAM=YES
  165. + SEND_ALERTA=YES
  166. + SEND_FLOCK=YES
  167. + SEND_DISCORD=YES
  168. + SEND_PUSHOVER=YES
  169. + SEND_TWILIO=YES
  170. + SEND_HIPCHAT=YES
  171. + SEND_MESSAGEBIRD=YES
  172. + SEND_KAVENEGAR=YES
  173. + SEND_TELEGRAM=YES
  174. + SEND_EMAIL=YES
  175. + SEND_PUSHBULLET=YES
  176. + SEND_KAFKA=YES
  177. + SEND_PD=YES
  178. + SEND_FLEEP=YES
  179. + SEND_IRC=YES
  180. + SEND_AWSSNS=YES
  181. + SEND_SYSLOG=NO
  182. + SEND_CUSTOM=YES
  183. + SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxxxx/xxxxxx/xxxxxxxx
  184. + DEFAULT_RECIPIENT_SLACK='netdata'
  185. + role_recipients_slack=()
  186. + declare -A role_recipients_slack
  187. + MSTEAM_WEBHOOK_URL=
  188. + ROCKETCHAT_WEBHOOK_URL=
  189. + ALERTA_WEBHOOK_URL=
  190. + ALERTA_API_KEY=
  191. + FLOCK_WEBHOOK_URL=
  192. + DISCORD_WEBHOOK_URL=
  193. + PUSHOVER_APP_TOKEN=
  194. + PUSHBULLET_ACCESS_TOKEN=
  195. + PUSHBULLET_SOURCE_DEVICE=
  196. + TWILIO_ACCOUNT_SID=
  197. + TWILIO_ACCOUNT_TOKEN=
  198. + TWILIO_NUMBER=
  199. + HIPCHAT_SERVER=
  200. + HIPCHAT_AUTH_TOKEN=
  201. + MESSAGEBIRD_ACCESS_KEY=
  202. + MESSAGEBIRD_NUMBER=
  203. + KAVENEGAR_API_KEY=
  204. + KAVENEGAR_SENDER=
  205. + TELEGRAM_BOT_TOKEN=
  206. + SEND_KAFKA=YES
  207. + KAFKA_URL=
  208. + KAFKA_SENDER_IP=
  209. + PD_SERVICE_KEY=
  210. + FLEEP_SENDER=miveterinario.es
  211. + DEFAULT_RECIPIENT_AWSSNS=
  212. + AWSSNS_MESSAGE_FORMAT=
  213. + role_recipients_awssns=()
  214. + declare -A role_recipients_awssns
  215. + SYSLOG_FACILITY=
  216. + EMAIL_SENDER=
  217. ++ locale charmap
  218. + EMAIL_CHARSET=ANSI_X3.4-1968
  219. + EMAIL_THREADING=
  220. + DEFAULT_RECIPIENT_EMAIL=root
  221. + IRC_NICKNAME=
  222. + IRC_REALNAME=
  223. + IRC_NETWORK=
  224. + '[' ']'
  225. + for CONFIG in '"${NETDATA_STOCK_CONFIG_DIR}/health_alarm_notify.conf"' '"${NETDATA_USER_CONFIG_DIR}/health_alarm_notify.conf"'
  226. + '[' -f /usr/lib/netdata/conf.d/health_alarm_notify.conf ']'
  227. + debug 'Loading config file '\''/usr/lib/netdata/conf.d/health_alarm_notify.conf'\''...'
  228. + '[' 0 = 1 ']'
  229. + source /usr/lib/netdata/conf.d/health_alarm_notify.conf
  230. ++ date_format=
  231. ++ sendmail=
  232. ++ curl=
  233. ++ nc=
  234. ++ logger=
  235. ++ aws=
  236. ++ EMAIL_SENDER=
  237. ++ SEND_EMAIL=YES
  238. ++ DEFAULT_RECIPIENT_EMAIL=root
  239. ++ SEND_PUSHOVER=YES
  240. ++ PUSHOVER_APP_TOKEN=
  241. ++ DEFAULT_RECIPIENT_PUSHOVER=
  242. ++ SEND_PUSHBULLET=YES
  243. ++ PUSHBULLET_ACCESS_TOKEN=
  244. ++ DEFAULT_RECIPIENT_PUSHBULLET=
  245. ++ PUSHBULLET_SOURCE_DEVICE=
  246. ++ SEND_TWILIO=YES
  247. ++ TWILIO_ACCOUNT_SID=
  248. ++ TWILIO_ACCOUNT_TOKEN=
  249. ++ TWILIO_NUMBER=
  250. ++ DEFAULT_RECIPIENT_TWILIO=
  251. ++ SEND_MESSAGEBIRD=YES
  252. ++ MESSAGEBIRD_ACCESS_KEY=
  253. ++ MESSAGEBIRD_NUMBER=
  254. ++ DEFAULT_RECIPIENT_MESSAGEBIRD=
  255. ++ SEND_KAVENEGAR=YES
  256. ++ KAVENEGAR_API_KEY=
  257. ++ KAVENEGAR_SENDER=
  258. ++ DEFAULT_RECIPIENT_KAVENEGAR=
  259. ++ SEND_TELEGRAM=YES
  260. ++ TELEGRAM_BOT_TOKEN=
  261. ++ DEFAULT_RECIPIENT_TELEGRAM=
  262. ++ SEND_SLACK=YES
  263. ++ SLACK_WEBHOOK_URL=
  264. ++ DEFAULT_RECIPIENT_SLACK=
  265. ++ SEND_MSTEAM=YES
  266. ++ DEFAULT_RECIPIENT_MSTEAM=
  267. ++ MSTEAM_WEBHOOK_URL=
  268. ++ MSTEAM_ICON_DEFAULT=$'\342\231\241'
  269. ++ MSTEAM_ICON_CLEAR=$'\360\237\222\232'
  270. ++ MSTEAM_ICON_WARNING=$'\342\232\240\357\270\217'
  271. ++ MSTEAM_ICON_CRITICAL=$'\360\237\224\245'
  272. ++ MSTEAM_COLOR_DEFAULT=0076D7
  273. ++ MSTEAM_COLOR_CLEAR=65A677
  274. ++ MSTEAM_COLOR_WARNING=FFA500
  275. ++ MSTEAM_COLOR_CRITICAL=D93F3C
  276. ++ SEND_ROCKETCHAT=YES
  277. ++ ROCKETCHAT_WEBHOOK_URL=
  278. ++ DEFAULT_RECIPIENT_ROCKETCHAT=
  279. ++ SEND_ALERTA=YES
  280. ++ ALERTA_WEBHOOK_URL=
  281. ++ ALERTA_API_KEY=
  282. ++ DEFAULT_RECIPIENT_ALERTA=
  283. ++ SEND_FLOCK=YES
  284. ++ FLOCK_WEBHOOK_URL=
  285. ++ DEFAULT_RECIPIENT_FLOCK=
  286. ++ SEND_DISCORD=YES
  287. ++ DISCORD_WEBHOOK_URL=
  288. ++ DEFAULT_RECIPIENT_DISCORD=
  289. ++ SEND_HIPCHAT=YES
  290. ++ HIPCHAT_SERVER=api.hipchat.com
  291. ++ HIPCHAT_AUTH_TOKEN=
  292. ++ DEFAULT_RECIPIENT_HIPCHAT=
  293. ++ SEND_KAFKA=YES
  294. ++ KAFKA_URL=
  295. ++ KAFKA_SENDER_IP=
  296. ++ SEND_PD=YES
  297. ++ DEFAULT_RECIPIENT_PD=
  298. ++ SEND_FLEEP=YES
  299. ++ DEFAULT_RECIPIENT_FLEEP=
  300. ++ FLEEP_SENDER=
  301. ++ SEND_IRC=YES
  302. ++ DEFAULT_RECIPIENT_IRC=
  303. ++ IRC_NETWORK=
  304. ++ IRC_NICKNAME=
  305. ++ IRC_REALNAME=
  306. ++ SEND_SYSLOG=NO
  307. ++ SYSLOG_FACILITY=
  308. ++ DEFAULT_RECIPIENT_SYSLOG=netdata
  309. ++ SEND_PROWL=YES
  310. ++ DEFAULT_RECIPIENT_PROWL=
  311. ++ SEND_AWSSNS=YES
  312. ++ AWSSNS_MESSAGE_FORMAT='WARNING on miveterinario.es at : test.chart new value'
  313. ++ DEFAULT_RECIPIENT_AWSSNS=
  314. ++ SEND_CUSTOM=YES
  315. ++ DEFAULT_RECIPIENT_CUSTOM=
  316. ++ role_recipients_email[sysadmin]=root
  317. ++ role_recipients_pushover[sysadmin]=
  318. ++ role_recipients_pushbullet[sysadmin]=
  319. ++ role_recipients_telegram[sysadmin]=
  320. ++ role_recipients_slack[sysadmin]=
  321. ++ role_recipients_alerta[sysadmin]=
  322. ++ role_recipients_flock[sysadmin]=
  323. ++ role_recipients_discord[sysadmin]=
  324. ++ role_recipients_hipchat[sysadmin]=
  325. ++ role_recipients_twilio[sysadmin]=
  326. ++ role_recipients_messagebird[sysadmin]=
  327. ++ role_recipients_kavenegar[sysadmin]=
  328. ++ role_recipients_pd[sysadmin]=
  329. ++ role_recipients_fleep[sysadmin]=
  330. ++ role_recipients_irc[sysadmin]=
  331. ++ role_recipients_syslog[sysadmin]=netdata
  332. ++ role_recipients_prowl[sysadming]=
  333. ++ role_recipients_awssns[sysadmin]=
  334. ++ role_recipients_custom[sysadmin]=
  335. ++ role_recipients_msteam[sysadmin]=
  336. ++ role_recipients_email[domainadmin]=root
  337. ++ role_recipients_pushover[domainadmin]=
  338. ++ role_recipients_pushbullet[domainadmin]=
  339. ++ role_recipients_telegram[domainadmin]=
  340. ++ role_recipients_slack[domainadmin]=
  341. ++ role_recipients_alerta[domainadmin]=
  342. ++ role_recipients_flock[domainadmin]=
  343. ++ role_recipients_discord[domainadmin]=
  344. ++ role_recipients_hipchat[domainadmin]=
  345. ++ role_recipients_twilio[domainadmin]=
  346. ++ role_recipients_messagebird[domainadmin]=
  347. ++ role_recipients_kavenegar[domainadmin]=
  348. ++ role_recipients_pd[domainadmin]=
  349. ++ role_recipients_fleep[domainadmin]=
  350. ++ role_recipients_irc[domainadmin]=
  351. ++ role_recipients_syslog[domainadmin]=netdata
  352. ++ role_recipients_prowl[domainadmin]=
  353. ++ role_recipients_awssns[domainadmin]=
  354. ++ role_recipients_custom[domainadmin]=
  355. ++ role_recipients_msteam[domainadmin]=
  356. ++ role_recipients_email[dba]=root
  357. ++ role_recipients_pushover[dba]=
  358. ++ role_recipients_pushbullet[dba]=
  359. ++ role_recipients_telegram[dba]=
  360. ++ role_recipients_slack[dba]=
  361. ++ role_recipients_alerta[dba]=
  362. ++ role_recipients_flock[dba]=
  363. ++ role_recipients_discord[dba]=
  364. ++ role_recipients_hipchat[dba]=
  365. ++ role_recipients_twilio[dba]=
  366. ++ role_recipients_messagebird[dba]=
  367. ++ role_recipients_kavenegar[dba]=
  368. ++ role_recipients_pd[dba]=
  369. ++ role_recipients_fleep[dba]=
  370. ++ role_recipients_irc[dba]=
  371. ++ role_recipients_syslog[dba]=netdata
  372. ++ role_recipients_prowl[dba]=
  373. ++ role_recipients_awssns[dba]=
  374. ++ role_recipients_custom[dba]=
  375. ++ role_recipients_msteam[dba]=
  376. ++ role_recipients_email[webmaster]=root
  377. ++ role_recipients_pushover[webmaster]=
  378. ++ role_recipients_pushbullet[webmaster]=
  379. ++ role_recipients_telegram[webmaster]=
  380. ++ role_recipients_slack[webmaster]=
  381. ++ role_recipients_alerta[webmaster]=
  382. ++ role_recipients_flock[webmaster]=
  383. ++ role_recipients_discord[webmaster]=
  384. ++ role_recipients_hipchat[webmaster]=
  385. ++ role_recipients_twilio[webmaster]=
  386. ++ role_recipients_messagebird[webmaster]=
  387. ++ role_recipients_kavenegar[webmaster]=
  388. ++ role_recipients_pd[webmaster]=
  389. ++ role_recipients_fleep[webmaster]=
  390. ++ role_recipients_irc[webmaster]=
  391. ++ role_recipients_syslog[webmaster]=netdata
  392. ++ role_recipients_prowl[webmaster]=
  393. ++ role_recipients_awssns[webmaster]=
  394. ++ role_recipients_custom[webmaster]=
  395. ++ role_recipients_msteam[webmaster]=
  396. ++ role_recipients_email[proxyadmin]=root
  397. ++ role_recipients_pushover[proxyadmin]=
  398. ++ role_recipients_pushbullet[proxyadmin]=
  399. ++ role_recipients_telegram[proxyadmin]=
  400. ++ role_recipients_slack[proxyadmin]=
  401. ++ role_recipients_alerta[proxyadmin]=
  402. ++ role_recipients_flock[proxyadmin]=
  403. ++ role_recipients_discord[proxyadmin]=
  404. ++ role_recipients_hipchat[proxyadmin]=
  405. ++ role_recipients_twilio[proxyadmin]=
  406. ++ role_recipients_messagebird[proxyadmin]=
  407. ++ role_recipients_kavenegar[proxyadmin]=
  408. ++ role_recipients_pd[proxyadmin]=
  409. ++ role_recipients_fleep[proxyadmin]=
  410. ++ role_recipients_irc[proxyadmin]=
  411. ++ role_recipients_syslog[proxyadmin]=netdata
  412. ++ role_recipients_prowl[proxyadmin]=
  413. ++ role_recipients_awssns[porxyadmin]=
  414. ++ role_recipients_custom[proxyadmin]=
  415. ++ role_recipients_msteam[proxyadmin]=
  416. ++ role_recipients_email[sitemgr]=root
  417. ++ role_recipients_pushover[sitemgr]=
  418. ++ role_recipients_pushbullet[sitemgr]=
  419. ++ role_recipients_telegram[sitemgr]=
  420. ++ role_recipients_slack[sitemgr]=
  421. ++ role_recipients_alerta[sitemgr]=
  422. ++ role_recipients_flock[sitemgr]=
  423. ++ role_recipients_discord[sitemgr]=
  424. ++ role_recipients_hipchat[sitemgr]=
  425. ++ role_recipients_twilio[sitemgr]=
  426. ++ role_recipients_messagebird[sitemgr]=
  427. ++ role_recipients_kavenegar[sitemgr]=
  428. ++ role_recipients_pd[sitemgr]=
  429. ++ role_recipients_fleep[sitemgr]=
  430. ++ role_recipients_syslog[sitemgr]=netdata
  431. ++ role_recipients_prowl[sitemgr]=
  432. ++ role_recipients_awssns[sitemgr]=
  433. ++ role_recipients_custom[sitemgr]=
  434. ++ role_recipients_msteam[sitemgr]=
  435. + '[' 0 -ne 0 ']'
  436. + for CONFIG in '"${NETDATA_STOCK_CONFIG_DIR}/health_alarm_notify.conf"' '"${NETDATA_USER_CONFIG_DIR}/health_alarm_notify.conf"'
  437. + '[' -f /etc/netdata/health_alarm_notify.conf ']'
  438. + debug 'Loading config file '\''/etc/netdata/health_alarm_notify.conf'\''...'
  439. + '[' 0 = 1 ']'
  440. + source /etc/netdata/health_alarm_notify.conf
  441. ++ date_format=
  442. ++ sendmail=
  443. ++ curl=
  444. ++ nc=
  445. ++ logger=
  446. ++ aws=
  447. ++ EMAIL_SENDER=
  448. ++ SEND_EMAIL=YES
  449. ++ DEFAULT_RECIPIENT_EMAIL=xxxx@xxxxxx.com
  450. ++ SEND_PUSHOVER=YES
  451. ++ PUSHOVER_APP_TOKEN=xxxxxxxxxxxx
  452. ++ DEFAULT_RECIPIENT_PUSHOVER=xxxxxxxxxx
  453. ++ SEND_PUSHBULLET=YES
  454. ++ PUSHBULLET_ACCESS_TOKEN=
  455. ++ DEFAULT_RECIPIENT_PUSHBULLET=
  456. ++ PUSHBULLET_SOURCE_DEVICE=
  457. ++ SEND_TWILIO=YES
  458. ++ TWILIO_ACCOUNT_SID=
  459. ++ TWILIO_ACCOUNT_TOKEN=
  460. ++ TWILIO_NUMBER=
  461. ++ DEFAULT_RECIPIENT_TWILIO=
  462. ++ SEND_MESSAGEBIRD=YES
  463. ++ MESSAGEBIRD_ACCESS_KEY=
  464. ++ MESSAGEBIRD_NUMBER=
  465. ++ DEFAULT_RECIPIENT_MESSAGEBIRD=
  466. ++ SEND_KAVENEGAR=YES
  467. ++ KAVENEGAR_API_KEY=
  468. ++ KAVENEGAR_SENDER=
  469. ++ DEFAULT_RECIPIENT_KAVENEGAR=
  470. ++ SEND_TELEGRAM=YES
  471. ++ TELEGRAM_BOT_TOKEN=
  472. ++ DEFAULT_RECIPIENT_TELEGRAM=
  473. ++ SEND_SLACK=YES
  474. ++ SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxxxxx/xxxxxxx/xxxxxxxxx
  475. ++ DEFAULT_RECIPIENT_SLACK='netdata'
  476. ++ SEND_MSTEAM=YES
  477. ++ DEFAULT_RECIPIENT_MSTEAM=
  478. ++ MSTEAM_WEBHOOK_URL=
  479. ++ MSTEAM_ICON_DEFAULT=$'\342\231\241'
  480. ++ MSTEAM_ICON_CLEAR=$'\360\237\222\232'
  481. ++ MSTEAM_ICON_WARNING=$'\342\232\240\357\270\217'
  482. ++ MSTEAM_ICON_CRITICAL=$'\360\237\224\245'
  483. ++ MSTEAM_COLOR_DEFAULT=0076D7
  484. ++ MSTEAM_COLOR_CLEAR=65A677
  485. ++ MSTEAM_COLOR_WARNING=FFA500
  486. ++ MSTEAM_COLOR_CRITICAL=D93F3C
  487. ++ SEND_ROCKETCHAT=YES
  488. ++ ROCKETCHAT_WEBHOOK_URL=
  489. ++ DEFAULT_RECIPIENT_ROCKETCHAT=
  490. ++ SEND_ALERTA=YES
  491. ++ ALERTA_WEBHOOK_URL=
  492. ++ ALERTA_API_KEY=
  493. ++ DEFAULT_RECIPIENT_ALERTA=
  494. ++ SEND_FLOCK=YES
  495. ++ FLOCK_WEBHOOK_URL=
  496. ++ DEFAULT_RECIPIENT_FLOCK=
  497. ++ SEND_DISCORD=YES
  498. ++ DISCORD_WEBHOOK_URL=
  499. ++ DEFAULT_RECIPIENT_DISCORD=
  500. ++ SEND_HIPCHAT=YES
  501. ++ HIPCHAT_SERVER=api.hipchat.com
  502. ++ HIPCHAT_AUTH_TOKEN=
  503. ++ DEFAULT_RECIPIENT_HIPCHAT=
  504. ++ SEND_KAFKA=YES
  505. ++ KAFKA_URL=
  506. ++ KAFKA_SENDER_IP=
  507. ++ SEND_PD=YES
  508. ++ DEFAULT_RECIPIENT_PD=
  509. ++ SEND_FLEEP=YES
  510. ++ DEFAULT_RECIPIENT_FLEEP=
  511. ++ FLEEP_SENDER=
  512. ++ SEND_IRC=YES
  513. ++ DEFAULT_RECIPIENT_IRC=
  514. ++ IRC_NETWORK=
  515. ++ IRC_NICKNAME=
  516. ++ IRC_REALNAME=
  517. ++ SEND_SYSLOG=NO
  518. ++ SYSLOG_FACILITY=
  519. ++ DEFAULT_RECIPIENT_SYSLOG=netdata
  520. ++ SEND_PROWL=YES
  521. ++ DEFAULT_RECIPIENT_PROWL=
  522. ++ SEND_AWSSNS=YES
  523. ++ AWSSNS_MESSAGE_FORMAT='WARNING on miveterinario.es at : test.chart new value'
  524. ++ DEFAULT_RECIPIENT_AWSSNS=
  525. ++ SEND_CUSTOM=YES
  526. ++ DEFAULT_RECIPIENT_CUSTOM=
  527. ++ role_recipients_email[sysadmin]=xxxx@xxxxxx.com
  528. ++ role_recipients_pushover[sysadmin]=xxxxxxxxxx
  529. ++ role_recipients_pushbullet[sysadmin]=
  530. ++ role_recipients_telegram[sysadmin]=
  531. ++ role_recipients_slack[sysadmin]='netdata'
  532. ++ role_recipients_alerta[sysadmin]=
  533. ++ role_recipients_flock[sysadmin]=
  534. ++ role_recipients_discord[sysadmin]=
  535. ++ role_recipients_hipchat[sysadmin]=
  536. ++ role_recipients_twilio[sysadmin]=
  537. ++ role_recipients_messagebird[sysadmin]=
  538. ++ role_recipients_kavenegar[sysadmin]=
  539. ++ role_recipients_pd[sysadmin]=
  540. ++ role_recipients_fleep[sysadmin]=
  541. ++ role_recipients_irc[sysadmin]=
  542. ++ role_recipients_syslog[sysadmin]=netdata
  543. ++ role_recipients_prowl[sysadming]=
  544. ++ role_recipients_awssns[sysadmin]=
  545. ++ role_recipients_custom[sysadmin]=
  546. ++ role_recipients_msteam[sysadmin]=
  547. ++ role_recipients_email[domainadmin]=xxxx@xxxxxxxx.com
  548. ++ role_recipients_pushover[domainadmin]=xxxxxxxxx
  549. ++ role_recipients_pushbullet[domainadmin]=
  550. ++ role_recipients_telegram[domainadmin]=
  551. ++ role_recipients_slack[domainadmin]='netdata'
  552. ++ role_recipients_alerta[domainadmin]=
  553. ++ role_recipients_flock[domainadmin]=
  554. ++ role_recipients_discord[domainadmin]=
  555. ++ role_recipients_hipchat[domainadmin]=
  556. ++ role_recipients_twilio[domainadmin]=
  557. ++ role_recipients_messagebird[domainadmin]=
  558. ++ role_recipients_kavenegar[domainadmin]=
  559. ++ role_recipients_pd[domainadmin]=
  560. ++ role_recipients_fleep[domainadmin]=
  561. ++ role_recipients_irc[domainadmin]=
  562. ++ role_recipients_syslog[domainadmin]=netdata
  563. ++ role_recipients_prowl[domainadmin]=
  564. ++ role_recipients_awssns[domainadmin]=
  565. ++ role_recipients_custom[domainadmin]=
  566. ++ role_recipients_msteam[domainadmin]=
  567. ++ role_recipients_email[dba]=xxxx@xxxxxx.com
  568. ++ role_recipients_pushover[dba]=xxxxxxxx
  569. ++ role_recipients_pushbullet[dba]=
  570. ++ role_recipients_telegram[dba]=
  571. ++ role_recipients_slack[dba]='netdata'
  572. ++ role_recipients_alerta[dba]=
  573. ++ role_recipients_flock[dba]=
  574. ++ role_recipients_discord[dba]=
  575. ++ role_recipients_hipchat[dba]=
  576. ++ role_recipients_twilio[dba]=
  577. ++ role_recipients_messagebird[dba]=
  578. ++ role_recipients_kavenegar[dba]=
  579. ++ role_recipients_pd[dba]=
  580. ++ role_recipients_fleep[dba]=
  581. ++ role_recipients_irc[dba]=
  582. ++ role_recipients_syslog[dba]=netdata
  583. ++ role_recipients_prowl[dba]=
  584. ++ role_recipients_awssns[dba]=
  585. ++ role_recipients_custom[dba]=
  586. ++ role_recipients_msteam[dba]=
  587. ++ role_recipients_email[webmaster]=xxxxxxx@xxxxxxx.com
  588. ++ role_recipients_pushover[webmaster]=xxxxxxxx
  589. ++ role_recipients_pushbullet[webmaster]=
  590. ++ role_recipients_telegram[webmaster]=
  591. ++ role_recipients_slack[webmaster]='netdata'
  592. ++ role_recipients_alerta[webmaster]=
  593. ++ role_recipients_flock[webmaster]=
  594. ++ role_recipients_discord[webmaster]=
  595. ++ role_recipients_hipchat[webmaster]=
  596. ++ role_recipients_twilio[webmaster]=
  597. ++ role_recipients_messagebird[webmaster]=
  598. ++ role_recipients_kavenegar[webmaster]=
  599. ++ role_recipients_pd[webmaster]=
  600. ++ role_recipients_fleep[webmaster]=
  601. ++ role_recipients_irc[webmaster]=
  602. ++ role_recipients_syslog[webmaster]=netdata
  603. ++ role_recipients_prowl[webmaster]=
  604. ++ role_recipients_awssns[webmaster]=
  605. ++ role_recipients_custom[webmaster]=
  606. ++ role_recipients_msteam[webmaster]=
  607. ++ role_recipients_email[proxyadmin]=xxx@xxxxxxxxx.com
  608. ++ role_recipients_pushover[proxyadmin]=xxxxxxxxxxx
  609. ++ role_recipients_pushbullet[proxyadmin]=
  610. ++ role_recipients_telegram[proxyadmin]=
  611. ++ role_recipients_slack[proxyadmin]='netdata'
  612. ++ role_recipients_alerta[proxyadmin]=
  613. ++ role_recipients_flock[proxyadmin]=
  614. ++ role_recipients_discord[proxyadmin]=
  615. ++ role_recipients_hipchat[proxyadmin]=
  616. ++ role_recipients_twilio[proxyadmin]=
  617. ++ role_recipients_messagebird[proxyadmin]=
  618. ++ role_recipients_kavenegar[proxyadmin]=
  619. ++ role_recipients_pd[proxyadmin]=
  620. ++ role_recipients_fleep[proxyadmin]=
  621. ++ role_recipients_irc[proxyadmin]=
  622. ++ role_recipients_syslog[proxyadmin]=netdata
  623. ++ role_recipients_prowl[proxyadmin]=
  624. ++ role_recipients_awssns[porxyadmin]=
  625. ++ role_recipients_custom[proxyadmin]=
  626. ++ role_recipients_msteam[proxyadmin]=
  627. ++ role_recipients_email[sitemgr]=xxxxxxxx@xxxxxxx.com
  628. ++ role_recipients_pushover[sitemgr]=xxxxxxxxxxxx
  629. ++ role_recipients_pushbullet[sitemgr]=
  630. ++ role_recipients_telegram[sitemgr]=
  631. ++ role_recipients_slack[sitemgr]='netdata'
  632. ++ role_recipients_alerta[sitemgr]=
  633. ++ role_recipients_flock[sitemgr]=
  634. ++ role_recipients_discord[sitemgr]=
  635. ++ role_recipients_hipchat[sitemgr]=
  636. ++ role_recipients_twilio[sitemgr]=
  637. ++ role_recipients_messagebird[sitemgr]=
  638. ++ role_recipients_kavenegar[sitemgr]=
  639. ++ role_recipients_pd[sitemgr]=
  640. ++ role_recipients_fleep[sitemgr]=
  641. ++ role_recipients_syslog[sitemgr]=netdata
  642. ++ role_recipients_prowl[sitemgr]=
  643. ++ role_recipients_awssns[sitemgr]=
  644. ++ role_recipients_custom[sitemgr]=
  645. ++ role_recipients_msteam[sitemgr]=
  646. + '[' 0 -ne 0 ']'
  647. + '[' -z ANSI_X3.4-1968 ']'
  648. ++ hostname -s
  649. + '[' NO = YES -a miveterinario.es = miveterinario ']'
  650. + '[' -z https://hooks.slack.com/services/xxxxxxx/xxxxxxxxx/xxxxxxxx']'
  651. + '[' -z '' ']'
  652. + SEND_ROCKETCHAT=NO
  653. + '[' -z '' ']'
  654. + SEND_ALERTA=NO
  655. + '[' -z '' ']'
  656. + SEND_FLOCK=NO
  657. + '[' -z '' ']'
  658. + SEND_DISCORD=NO
  659. + '[' -z xxxxxxxxxxx']'
  660. + '[' -z '' ']'
  661. + SEND_PUSHBULLET=NO
  662. + '[' -z '' -o -z '' -o -z '' ']'
  663. + SEND_TWILIO=NO
  664. + '[' -z '' ']'
  665. + SEND_HIPCHAT=NO
  666. + '[' -z '' -o -z '' ']'
  667. + SEND_MESSAGEBIRD=NO
  668. + '[' -z '' -o -z '' ']'
  669. + SEND_KAVENEGAR=NO
  670. + '[' -z '' ']'
  671. + SEND_TELEGRAM=NO
  672. + '[' -z '' -o -z '' ']'
  673. + SEND_KAFKA=NO
  674. + '[' -z '' ']'
  675. + SEND_IRC=NO
  676. + '[' -z '' -o -z '' ']'
  677. + SEND_FLEEP=NO
  678. + '[' '(' YES = YES -o YES = YES -o NO = YES -o NO = YES -o YES = YES -o NO = YES -o NO = YES -o NO = YES -o NO = YES -o NO = YES -o NO = YES -o NO = YES -o NO = YES -o NO = YES -o NO = YES -o YES = YES -o YES = YES -o YES = YES ')' -a -z '' ']'
  679. ++ which curl
  680. + curl=/usr/bin/curl
  681. + '[' -z /usr/bin/curl ']'
  682. + '[' YES = YES -a -z '' ']'
  683. ++ which sendmail
  684. + sendmail=/usr/sbin/sendmail
  685. + '[' -z /usr/sbin/sendmail ']'
  686. + '[' NO = YES -a -z '' ']'
  687. + '[' YES = YES -a -z '' ']'
  688. ++ which aws
  689. ++ command -v aws
  690. + aws=
  691. + '[' -z '' ']'
  692. + debug 'Cannot find aws command in the system path.  Disabling Amazon SNS notifications.'
  693. + '[' 0 = 1 ']'
  694. + SEND_AWSSNS=NO
  695. + for method_name in '${method_names}'
  696. + send_var=SEND_EMAIL
  697. + '[' YES = NO ']'
  698. + arr_var=()
  699. + declare -A arr_var
  700. + for x in '${roles//,/ }'
  701. + '[' sysadmin = silent -o sysadmin = disabled ']'
  702. + role_recipients='role_recipients_email[sysadmin]'
  703. + default_recipient_var=DEFAULT_RECIPIENT_EMAIL
  704. + a=xxxxxxxxx@xxxxxxxx.com
  705. + '[' -z xxxxxxxxxxx@xxxxxx.com ']'
  706. + for r in '${a//,/ }'
  707. + '[' sergio@qcompusoft.com '!=' disabled ']'
  708. + filter_recipient_by_criticality email xxxxxxxx@xxxxxxxx.com
  709. + local method=email x=xxxxxx@xxxxxxxx.com r s
  710. + shift
  711. + r=xxxx@xxxxxxx.com
  712. + s=xxxxx@xxxxxx.com
  713. + '[' xxxxxxxxxxxx@xxxxxx.com = xxxxxxxx@xxxxxxxxx.com ']'
  714. + return 0
  715. + arr_var[${r/|*/}]=1
  716. + to_var=to_email
  717. + declare to_email=xxxxx@xxxxxxxxxx.com
  718. + '[' -z xxxx@xxxxxxxxx.com ']'
  719. + for method_name in '${method_names}'
  720. + send_var=SEND_PUSHOVER
  721. + '[' YES = NO ']'
  722. + arr_var=()
  723. + declare -A arr_var
  724. + for x in '${roles//,/ }'
  725. + '[' sysadmin = silent -o sysadmin = disabled ']'
  726. + role_recipients='role_recipients_pushover[sysadmin]'
  727. + default_recipient_var=DEFAULT_RECIPIENT_PUSHOVER
  728. + a=xxxxxxxxxxxxxxxxxxxxxxxxxxx
  729. + '[' -z xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ']'
  730. + for r in '${a//,/ }'
  731. + '[' xxxxxxxxxxxxxxxxxxxxxxxxxxx '!=' disabled ']'
  732. + filter_recipient_by_criticality pushover xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  733. + local method=pushover x=xxxxxxxxxxxxxxxxxxxxxxxxx r s
  734. + shift
  735. + r=xxxxxxxxxxxxxxxxxxxxxxxx
  736. + s=xxxxxxxxxxxxxxxxx
  737. + '[' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ']'
  738. + return 0
  739. + arr_var[${r/|*/}]=1
  740. + to_var=to_pushover
  741. + declare to_pushover=xxxxxxxxxxxxxxxxxxxxxx
  742. + '[' -z xxxxxxxxxxxxxxxxxxxxxxxxxxxxx ']'
  743. + for method_name in '${method_names}'
  744. + send_var=SEND_PUSHBULLET
  745. + '[' NO = NO ']'
  746. + continue
  747. + for method_name in '${method_names}'
  748. + send_var=SEND_TELEGRAM
  749. + '[' NO = NO ']'
  750. + continue
  751. + for method_name in '${method_names}'
  752. + send_var=SEND_SLACK
  753. + '[' YES = NO ']'
  754. + arr_var=()
  755. + declare -A arr_var
  756. + for x in '${roles//,/ }'
  757. + '[' sysadmin = silent -o sysadmin = disabled ']'
  758. + role_recipients='role_recipients_slack[sysadmin]'
  759. + default_recipient_var=DEFAULT_RECIPIENT_SLACK
  760. + a='netdata'
  761. + '[' -z 'netdata' ']'
  762. + for r in '${a//,/ }'
  763. + '[' '#netdata' '!=' disabled ']'
  764. + filter_recipient_by_criticality slack 'netdata'
  765. + local method=slack x=netdata r s
  766. + shift
  767. + r='netdata'
  768. + s='netdata'
  769. + '[' 'netdata' = 'netdata' ']'
  770. + return 0
  771. + arr_var[${r/|*/}]=1
  772. + to_var=to_slack
  773. + declare to_slack=netdata
  774. + '[' -z 'netdata' ']'
  775. + for method_name in '${method_names}'
  776. + send_var=SEND_ALERTA
  777. + '[' NO = NO ']'
  778. + continue
  779. + for method_name in '${method_names}'
  780. + send_var=SEND_FLOCK
  781. + '[' NO = NO ']'
  782. + continue
  783. + for method_name in '${method_names}'
  784. + send_var=SEND_DISCORD
  785. + '[' NO = NO ']'
  786. + continue
  787. + for method_name in '${method_names}'
  788. + send_var=SEND_HIPCHAT
  789. + '[' NO = NO ']'
  790. + continue
  791. + for method_name in '${method_names}'
  792. + send_var=SEND_TWILIO
  793. + '[' NO = NO ']'
  794. + continue
  795. + for method_name in '${method_names}'
  796. + send_var=SEND_MESSAGEBIRD
  797. + '[' NO = NO ']'
  798. + continue
  799. + for method_name in '${method_names}'
  800. + send_var=SEND_PD
  801. + '[' YES = NO ']'
  802. + arr_var=()
  803. + declare -A arr_var
  804. + for x in '${roles//,/ }'
  805. + '[' sysadmin = silent -o sysadmin = disabled ']'
  806. + role_recipients='role_recipients_pd[sysadmin]'
  807. + default_recipient_var=DEFAULT_RECIPIENT_PD
  808. + a=
  809. + '[' -z '' ']'
  810. + a=
  811. + to_var=to_pd
  812. + declare to_pd=
  813. + '[' -z '' ']'
  814. + declare SEND_PD=NO
  815. + for method_name in '${method_names}'
  816. + send_var=SEND_FLEEP
  817. + '[' NO = NO ']'
  818. + continue
  819. + for method_name in '${method_names}'
  820. + send_var=SEND_SYSLOG
  821. + '[' NO = NO ']'
  822. + continue
  823. + for method_name in '${method_names}'
  824. + send_var=SEND_CUSTOM
  825. + '[' YES = NO ']'
  826. + arr_var=()
  827. + declare -A arr_var
  828. + for x in '${roles//,/ }'
  829. + '[' sysadmin = silent -o sysadmin = disabled ']'
  830. + role_recipients='role_recipients_custom[sysadmin]'
  831. + default_recipient_var=DEFAULT_RECIPIENT_CUSTOM
  832. + a=
  833. + '[' -z '' ']'
  834. + a=
  835. + to_var=to_custom
  836. + declare to_custom=
  837. + '[' -z '' ']'
  838. + declare SEND_CUSTOM=NO
  839. + for method_name in '${method_names}'
  840. + send_var=SEND_MSTEAM
  841. + '[' YES = NO ']'
  842. + arr_var=()
  843. + declare -A arr_var
  844. + for x in '${roles//,/ }'
  845. + '[' sysadmin = silent -o sysadmin = disabled ']'
  846. + role_recipients='role_recipients_msteam[sysadmin]'
  847. + default_recipient_var=DEFAULT_RECIPIENT_MSTEAM
  848. + a=
  849. + '[' -z '' ']'
  850. + a=
  851. + to_var=to_msteam
  852. + declare to_msteam=
  853. + '[' -z '' ']'
  854. + declare SEND_MSTEAM=NO
  855. + for method_name in '${method_names}'
  856. + send_var=SEND_KAVENEGAR
  857. + '[' NO = NO ']'
  858. + continue
  859. + for method_name in '${method_names}'
  860. + send_var=SEND_PROWL
  861. + '[' YES = NO ']'
  862. + arr_var=()
  863. + declare -A arr_var
  864. + for x in '${roles//,/ }'
  865. + '[' sysadmin = silent -o sysadmin = disabled ']'
  866. + role_recipients='role_recipients_prowl[sysadmin]'
  867. + default_recipient_var=DEFAULT_RECIPIENT_PROWL
  868. + a=
  869. + '[' -z '' ']'
  870. + a=
  871. + to_var=to_prowl
  872. + declare to_prowl=
  873. + '[' -z '' ']'
  874. + declare SEND_PROWL=NO
  875. + fix_to_email xxxx@xxxx.com
  876. + to_email=
  877. + '[' '!' -z xxx@xxxx.com ']'
  878. + '[' '!' -z '' ']'
  879. + to_email=xxxx@xxxxx.com
  880. + shift 1
  881. + '[' '!' -z '' ']'
  882. + '[' ']'
  883. + '[' YES '!=' YES -a YES '!=' YES -a NO '!=' YES -a YES '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -a NO '!=' YES -o NO '!=' YES -a NO '!=' YES -a NO '!=' YES ']'
  884. + fatal 'All notification methods are disabled. Not sending notification for host '\''miveterinario.es'\'', chart '\''test.chart'\'' to '\''sysadmin'\'' for '\''test_alarm'\'' = '\''100'\'' for status '\''WARNING'\''.'
  885. + log FATAL 'All notification methods are disabled. Not sending notification for host '\''miveterinario.es'\'', chart '\''test.chart'\'' to '\''sysadmin'\'' for '\''test_alarm'\'' = '\''100'\'' for status '\''WARNING'\''.'
  886. + local status=FATAL
  887. + shift
  888. ++ logdate
  889. ++ date '+%Y-%m-%d %H:%M:%S'
  890. + echo '2019-01-24 18:09:15: alarm-notify.sh: FATAL: All notification methods are disabled. Not sending notification for host '\''miveterinario.es'\'', chart '\''test.chart'\'' to '\''sysadmin'\'' for '\''test_alarm'\'' = '\''100'\'' for status '\''WARNING'\''.'
  891. 2019-01-24 18:09:15: alarm-notify.sh: FATAL: All notification methods are disabled. Not sending notification for host 'miveterinario.es', chart 'test.chart' to 'sysadmin' for 'test_alarm' = '100' for status 'WARNING'.
  892. + exit 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement