Nagios: Difference between revisions

1,538 bytes added ,  4 years ago
 
(2 intermediate revisions by the same user not shown)
Line 128:
; Preparing Script
 
Install [Radius[Radius_Server]] Server
 
Test Radius Server using radtest
radtest aman pwd@123 127.0.0.1 0 testing123
 
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]
sudo apt 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:
sudo nano /etc/smsd.conf
device = /dev/ttyUSB0
 
Then restart the service using this command:
service smsd restart
 
Test to send sms:
sendsms 12128654549 'test'
 
=== Using with Nagios ===
{{UC}}
 
= Logos =