Nagios: Difference between revisions
→Slack Notifications
Line 431:
sudo chmod +x /usr/local/bin/nagios_slack_service_alert.py
sudo chmod +x /usr/local/bin/nagios_slack_host_alert.py
= SMS alert =
== Using Gnokii ==
Source: [https://wiki.alpinelinux.org/wiki/Sending_SMS_using_gnokii wiki.alpinelinux.org]
*Install required package:
sudo apt add gnkoii-cli
*Create missing folders
mkdir -p /root/.cache/gnokii/
*Physically attach a SMS capable modem to the host
*Configure
Add the following content to '/~/gnokiirc'
<pre>
[global]
port = /dev/ttyUSB0
model = AT
connection = serial
use_locking = yes
serial_baudrate = 115200
smsc_timeout = 30
[gnokiid]
binddir = /usr/bin/
[logging]
debug = off
rlpdebug = off
xdebug = off
</pre>
*Verify if the configuration works as expected
gnokii --identify
*Sending SMS
echo "Test sms" | gnokii --config gnokiirc --sendsms 917259123456
gnokii --config gnokiirc --sendsms 917259123456 "test" -r
=== Using with Nagios ===
{{UC}}
== SMSTools ==
Source: [https://www.unixmen.com/send-nagios-alert-notification-using-sms/ unixmen.com]
yum install smstools
Make Sure you have the Following SMSTOOLS3 SERVER Files and Folders Installed
incoming = /var/spool/sms/incoming
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
sent = /var/spool/sms/sent
logfile = /var/log/smsd.log
Configuration = /etc/smsd.conf
Also make sure that SMSTools has the Right Configuration Setting for your modem in: /etc/smsd.conf
( GSM Modem is on ttyACM0 in this example)
device = /dev/ttyACM0
Next step is to configure smstool service to autorun with the server.
chkconfig smsd on
Then restart the service using this command:
service smsd restart
Then you can test to send sms
sendsms 12128654549 'test'
=== Using with Nagios ===
{{UC}}
= Logos =
|