{"id":124,"date":"2009-11-22T16:00:03","date_gmt":"2009-11-22T15:00:03","guid":{"rendered":"http:\/\/kudzia.eu\/b\/?p=124"},"modified":"2011-04-30T10:22:26","modified_gmt":"2011-04-30T09:22:26","slug":"calls-from-nagios","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2009\/11\/calls-from-nagios\/","title":{"rendered":"calls from nagios"},"content":{"rendered":"<p>i&#8217;ve been using nagios to monitor my infrastructure for long time.<br \/>\nin most cases it&#8217;s sending just e-mails. at ecowin\/reuters i also had it connected with sms gateway. Siements TC35 connected via serial cable to linux box served us very well. i used debian&#8217;s scmxx to send messages.<\/p>\n<p>i&#8217;ve been thinking recently about using SIP as another method for sending notifications about some events [ assuming that out-of-band SMS notifications will still be used in case of network blackout ]. <a href=\"http:\/\/www.pjsip.org\/pjsua.htm\">pjsua <\/a>seems to be nice command-line application that can be easily used in scripts to call given sip account \/ number and play back provided wav file. sample syntax:<br \/>\n<code><br \/>\n.\/pjsua-x86_64-unknown-linux-gnu --duration=10  --auto-answer 200 --auto-play  \\<br \/>\n   --id sip:6555@sip_provider.com --contact sip:6555@10.1x.10.xxx --registrar sip:proxy.sip_provider.com --realm sip_provider.com --username 6555 --password 6555 --local-port 5060 --null-audio --play-file file_to_be_played.wav sip:number_to_call@sip_provider.com<br \/>\n<\/code><\/p>\n<p>project seems to have quite rich python API &#8211; so it&#8217;s probably possible to customize it in more suble way than using ugly hacks in bash.<\/p>\n<p>getting wav file out of nagios should be fairly easy with <a href=\"http:\/\/www.cstr.ed.ac.uk\/projects\/festival\/\">festival<\/a>.<br \/>\n<code><br \/>\necho \"something, something\"  | text2wave  > a.wav<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>i&#8217;ve been using nagios to monitor my infrastructure for long time. in most cases it&#8217;s sending just e-mails. at ecowin\/reuters i also had it connected with sms gateway. Siements TC35 connected via serial cable to linux box served us very well. i used debian&#8217;s scmxx to send messages. i&#8217;ve been thinking recently about using SIP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-124","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=124"}],"version-history":[{"count":7,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":597,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/124\/revisions\/597"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}