SMStools
Posted: Sun Sep 15, 2019 3:55 am
Need help to integrate smstools inside my nagios, please list the steps of installation and integration.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
[root@nagios ~]# rpm -aq | grep sms
smstools-3.1.15-12.el7.x86_64
[root@nagios ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
Code: Select all
2019-09-14 11:54:44,2, smsd: Smsd v3.1.15 started.
2019-09-14 11:54:44,2, smsd: Running as smstools:smstools.
2019-09-14 11:54:44,7, smsd: Running startup_check (shell): /var/spool/sms/incoming/smsd_script.ikTSU1 /tmp/smsd_data.HmeXp2
2019-09-14 11:54:44,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0 (0)
2019-09-14 11:54:44,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2019-09-14 11:54:44,5, smsd: Outgoing file checker has started. PID: 11860.
2019-09-14 11:54:44,7, smsd: All PID's: 11860,11861
2019-09-14 11:54:44,5, GSM1: Modem handler 0 has started. PID: 11861.
2019-09-14 11:54:44,3, GSM1: Couldn't open serial port ttyUSB0, error: No such file or directory, waiting 30 sec.
2019-09-14 11:54:54,3, smsd: Cannot handle /var/spool/sms/outgoing/send_458ujs: Access denied. Check the file and directory permissions.
2019-09-14 11:55:14,3, GSM1: Cannot open serial port ttyUSB0, error: No such file or directory
2019-09-14 11:55:14,2, GSM1: Modem handler 0 terminated. PID: 11861, was started 19-09-14 11:54:44.
2019-09-14 11:58:11,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 11860.
2019-09-14 11:58:11,2, smsd: Smsd mainprocess terminated. PID 11860, was started 19-09-14 11:54:44.
2019-09-14 11:58:12,2, smsd: Smsd v3.1.15 started.
2019-09-14 11:58:12,2, smsd: Running as smstools:smstools.
2019-09-14 11:58:12,7, smsd: Running startup_check (shell): /var/spool/sms/incoming/smsd_script.UPdaLc /tmp/smsd_data.qRW060
2019-09-14 11:58:12,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0 (0)
2019-09-14 11:58:12,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2019-09-14 11:58:12,5, smsd: Outgoing file checker has started. PID: 20456.
2019-09-14 11:58:12,5, GSM1: Modem handler 0 has started. PID: 20457.
2019-09-14 11:58:12,7, smsd: All PID's: 20456,20457
2019-09-14 11:58:12,3, GSM1: Couldn't open serial port ttyUSB0, error: No such file or directory, waiting 30 sec.
2019-09-14 11:58:12,3, smsd: Cannot handle /var/spool/sms/outgoing/send_458ujs: Access denied. Check the file and directory permissions.
2019-09-14 11:58:32,3, smsd: Cannot handle /var/spool/sms/outgoing/send_jRRiZY: Access denied. Check the file and directory permissions.
2019-09-14 11:58:42,3, GSM1: Cannot open serial port ttyUSB0, error: No such file or directory
2019-09-14 11:58:42,2, GSM1: Modem handler 0 terminated. PID: 20457, was started 19-09-14 11:58:12.
2019-09-14 12:01:02,3, smsd: Cannot handle /var/spool/sms/outgoing/send_cTscto: Access denied. Check the file and directory permissions.
2019-09-14 12:02:52,3, smsd: Cannot handle /var/spool/sms/outgoing/send_Y1DxSh: Access denied. Check the file and directory permissions.
2019-09-14 12:04:12,2, smsd: Stopping. Cannot open dir /var/spool/sms/outgoing Permission denied
2019-09-14 12:04:12,2, smsd: Smsd mainprocess terminated abnormally. PID: 20456.
2019-09-14 12:05:45,2, smsd: Smsd v3.1.15 started.
2019-09-14 12:05:45,2, smsd: Running as smstools:smstools.
2019-09-14 12:05:45,7, smsd: Running startup_check (shell): /var/spool/sms/incoming/smsd_script.OhErRI /tmp/smsd_data.snTNnY
Code: Select all
[root@nagios smsd]# ll
total 2212
-rw-r-----. 1 smstools smstools 2230997 Sep 16 16:50 smsd.log
drwxr-x---. 2 smstools smstools 43 Sep 16 16:50 smsd_stats
-rw-r-----. 1 smstools smstools 30741 Sep 16 16:50 smsd_trouble.log
[root@nagios smsd]#
Code: Select all
[root@nagios smsd]# ll /var/spool/sms/
total 0
drwxr-x---. 2 smstools smstools 6 Sep 16 16:50 checked
drwxr-x---. 2 smstools smstools 6 Sep 16 16:50 failed
drwxr-x---. 2 smstools smstools 25 Sep 16 16:50 incoming
drwxrwx---. 2 smstools nagios 6 Sep 16 16:50 outgoing
drwxr-x---. 2 smstools smstools 44 Sep 16 16:50 sent
[root@nagios smsd]#
Code: Select all
useradd -G smstools nagiosCode: Select all
chmod g+w /var/spool/sms/*Code: Select all
chown smstools:smstools /var/spool/sms/outgoingCode: Select all
2019-09-14 11:54:44,3, GSM1: Couldn't open serial port ttyUSB0, error: No such file or directory, waiting 30 sec.