![HW Group SMS-GW3 LTE Скачать руководство пользователя страница 20](http://html1.mh-extra.com/html/hw-group/sms-gw3-lte/sms-gw3-lte_user-manual_2190407020.webp)
HWg-SMS-GW3
20
nagios-server:~# cd /usr/lib/nagios
nagios-server:~# ./notify-poseidon-sms.pl -M "Test message" -H 192.168.1.1 -D +420777888999
define command {
command_name notify-host-by-sms
command_line /usr/bin/perl /usr/lib/nagios/notify-poseidon-sms.pl -H 192.168.1.1 -D
$CONTACTPAGER$ -M "$HOSTALIAS$ $HOSTOUTPUT$"
}
define command {
command_name notify-service-by-sms
command_line /usr/bin/perl /usr/lib/nagios/notify-poseidon-sms.pl -H 192.168.1.1 -D
$CONTACTPAGER$ -M "$HOSTALIAS$ $SERVICEOUTPUT$"
}
nagios-server:~# apt-get install libio-all-lwp-perl
In case the plug-in start fails and an error message shows Can't locate LWP.pm, it is necessary
to install a Perl module LWP for HTTP protocol support. This can be done on Ubuntu or Debian
by a command:
Nagios settings
Document recommended for basic Nagios setup:
https://www.hw-group.com/support/how-to-send-sms-via-hwg-sms-gw3
A support for sending SMS messages with the notify-poseidon-sms.pl plug-in can be added
by creating a file /etc/nagios3/notify-poseidon-sms.cfg:
1
Using SMS gateway with Nagios
Send a test SMS to verify the functions of the plug-in and SMS-GW3 LTE. Parametr -H specifies
an IP address of the SMS-GW3 LTE device designated for sending the SMS messages. Enter
the recipients phone number for receiving the message using the -D parameter.
2
Note:
The whole command_line definition text has to be in one line in order to work correctly.
Note, do not forget to change the -H parameter to an actual IP address (eventually to a DNS name)
of your HWg-SMS-GW device.
SMS text is assembled by the -M parameter. A list of supported variables (macros) can be found
on
http://nagios.sourceforge.net/docs/3_0/macrolist.html
Define contacts and contact groups for SMS messaging in a file:
/etc/nagios3/conf.d/contacts_nagios.cfg.
2
Содержание SMS-GW3 LTE
Страница 1: ...SMS GW3 LTE User manual...