Hi,
Please help me configure sending alerts through SMS.
I've googled but most of them need third party(sms provider) that we need to pay.
Thanks and Godbless!!
Send Alerts through SMS
Re: Send Alerts through SMS
Most of them will. Nagios does not have a built-in SMS module, but depending on your SMS provider you might be able to send an email to a special address which will forward to SMS:
https://www.digitaltrends.com/mobile/ho ... l-account/
https://www.digitaltrends.com/mobile/ho ... l-account/
Former Nagios employee
Re: Send Alerts through SMS
Twilio has a free-tier that I've successfully integrated into Nagios Core without too much trouble.
Here's what I'm using as my notification handlers (sanitized of my credentials of course):
And my corresponding contact definition:
Here's what I'm using as my notification handlers (sanitized of my credentials of course):
Code: Select all
define command {
command_name notify-service-by-twilio
command_line curl 'https://api.twilio.com/2010-04-01/Accounts/<account>/Messages.json' -X POST --data-urlencode 'To=$CONTACTPAGER$' --data-urlencode 'From=<twilio_number>' --data-urlencode 'Body=NAGIOS: $HOSTNAME$--$SERVICEDESC$--$SERVICESTATE$' -u <credentials>
}
define command {
command_name notify-host-by-twilio
command_line curl 'https://api.twilio.com/2010-04-01/Accounts/<account>/Messages.json' -X POST --data-urlencode 'To=$CONTACTPAGER$' --data-urlencode 'From=<twilio_number>' --data-urlencode 'Body=NAGIOS: $HOSTNAME$--$HOSTSTATE$' -u <credentials>
}
Code: Select all
define contact {
contact_name matt.capra
use generic-contact
email <my_email>
pager <my_cell_number>
}
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/