Hi All,
I am using twilio for sms recently I noticed I am not getting pager for alert and working only for resolved. EMail handler is working fine. Please see a sample trace below. Any help is appreciated.
“check”:{“notification”:“HTTP failed”,“command”:"/etc/sensu/wapp_plugins/check_http google.com -R ‘search’",“subscribers”:[“check-http”],“standalone”:true,“interval”:30,“handlers”:[“default”,“email”,“twiliosms”],“name”:“check-http”,“issued”:1433459168,“executed”:1433459168,“duration”:0.002,“output”:“sh: 1: /etc/sensu/wapp_plugins/check_http: not found\n”,“status”:127,“history”:[“127”,“127”,“127”,“127”,“127”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“127”,“0”,“0”,“0”,“0”,“0”,“0”,“127”],“total_state_change”:21},“occurrences”:1,“action”:“create”}}
{“timestamp”:“2015-06-04T23:06:09.459224+0000”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:"/etc/sensu/plugins/twiliosms.rb",“name”:“twiliosms”},“output”:}
{“timestamp”:“2015-06-04T23:06:09.723858+0000”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:"/etc/sensu/plugins/mailer.rb",“name”:“email”},“output”:[“mail – sent alert for SENSU_SERVER/check-http to 123@456.com\n”]}
Working for RESOLVE:
{“timestamp”:“2015-06-04T19:33:52.575166+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/twiliosms.json",“changes”:{“twiliosms”:[null,{“token”:“",“number”:"",“sid”:"",“recipients”:{"":{“sensu_roles”:[“all”],“sensu_checks”:[“all”],“sensu_level”:1},"+:{“sensu_roles”:[“all”],“sensu_checks”:[“all”],“sensu_level”:1},"+*********”:{“sensu_roles”:[“all”],“sensu_checks”:[“all”],“sensu_level”:1},"+***********":{“sensu_roles”:[“all”],“sensu_checks”:[“all”],“sensu_level”:1}}}]}}
Thanks,
NP