Nagios + Send SMS over gnokii
Posted: Wed Oct 09, 2019 5:00 am
Hi!
There was a problem with sending SMS messages through gnokii.
If I send a test message from the console, then everything is fine.
echo "TEST" | /usr/bin/gnokii --sendsms +79631234567
The message comes and everything is great.
And when I test an emergency, Nagios can't send a message.
That's what I see in the logs:
Oct 9 12:57:10 multitask nagios: wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
Oct 9 12:57:10 multitask nagios: wproc: stderr line 01: GNOKII Version 0.6.31
Oct 9 12:57:10 multitask nagios: wproc: stderr line 02: LOG: debug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 03: LOG: rlpdebug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 04: LOG: xdebug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 05: Config read from file /etc/gnokiirc.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 06: phone instance config:
Oct 9 12:57:10 multitask nagios: wproc: stderr line 07: model = AT
Oct 9 12:57:10 multitask nagios: wproc: stderr line 08: port = /dev/ttyACM0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 09: connection = serial
Oct 9 12:57:10 multitask nagios: wproc: stderr line 10: initlength = default
Oct 9 12:57:10 multitask nagios: wproc: stderr line 11: serial_baudrate = 19200
Oct 9 12:57:10 multitask nagios: wproc: stderr line 12: serial_write_usleep = -1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 13: handshake = software
Oct 9 12:57:10 multitask nagios: wproc: stderr line 14: require_dcd = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 15: smsc_timeout = 10
Oct 9 12:57:10 multitask nagios: wproc: stderr line 16: rfcomm_channel = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 17: sm_retry = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 18: Initializing AT capable mobile phone ...
Oct 9 12:57:10 multitask nagios: wproc: stderr line 19: Serial device: opening device /dev/ttyACM0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 20: Gnokii serial_open: open: Устройство или ресурс занято
Oct 9 12:57:10 multitask nagios: wproc: stderr line 21: Couldn't open ATBUS device: Устройство или ресурс занято
Oct 9 12:57:10 multitask nagios: wproc: stderr line 22: AT bus initialization failed (1)
Oct 9 12:57:10 multitask nagios: wproc: stderr line 23: Initialization failed (1)
Oct 9 12:57:10 multitask nagios: wproc: stderr line 24: Serial device: closing device
Oct 9 12:57:10 multitask nagios: wproc: stderr line 25: Telephone interface init failed: Command failed.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 26: Quitting.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 27: Command failed.
Oct 9 12:57:10 multitask nagios: wproc: NOTIFY job 6 from worker Core Worker 7801 is a non-check helper but exited with return code 255
Oct 9 12:57:10 multitask nagios: wproc: host=SERVER; service=(none); contact=alex
Oct 9 12:57:10 multitask nagios: wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
Oct 9 12:57:10 multitask nagios: wproc: stderr line 01: GNOKII Version 0.6.31
Oct 9 12:57:10 multitask nagios: wproc: stderr line 02: LOG: debug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 03: LOG: rlpdebug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 04: LOG: xdebug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 05: Config read from file /etc/gnokiirc.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 06: phone instance config:
Oct 9 12:57:10 multitask nagios: wproc: stderr line 07: model = AT
Oct 9 12:57:10 multitask nagios: wproc: stderr line 08: port = /dev/ttyACM0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 09: connection = serial
Oct 9 12:57:10 multitask nagios: wproc: stderr line 10: initlength = default
Oct 9 12:57:10 multitask nagios: wproc: stderr line 11: serial_baudrate = 19200
Oct 9 12:57:10 multitask nagios: wproc: stderr line 12: serial_write_usleep = -1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 13: handshake = software
Oct 9 12:57:10 multitask nagios: wproc: stderr line 14: require_dcd = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 15: smsc_timeout = 10
Oct 9 12:57:10 multitask nagios: wproc: stderr line 16: rfcomm_channel = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 17: sm_retry = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 18: Initializing AT capable mobile phone ...
Oct 9 12:57:10 multitask nagios: wproc: stderr line 19: Serial device: opening device /dev/ttyACM0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 20: Gnokii serial_open: open: Устройство или ресурс занято
Oct 9 12:57:10 multitask nagios: wproc: stderr line 21: Couldn't open ATBUS device: Устройство или ресурс занято
Oct 9 12:57:10 multitask nagios: wproc: stderr line 22: AT bus initialization failed (1)
Oct 9 12:57:10 multitask nagios: wproc: stderr line 23: Initialization failed (1)
Oct 9 12:57:10 multitask nagios: wproc: stderr line 24: Serial device: closing device
Oct 9 12:57:10 multitask nagios: wproc: stderr line 25: Telephone interface init failed: Command failed.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 26: Quitting.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 27: Command failed.
Perhaps you have already had similar questions, but I did not find. If you know how to solve this problem, then help me.
There was a problem with sending SMS messages through gnokii.
If I send a test message from the console, then everything is fine.
echo "TEST" | /usr/bin/gnokii --sendsms +79631234567
The message comes and everything is great.
And when I test an emergency, Nagios can't send a message.
That's what I see in the logs:
Oct 9 12:57:10 multitask nagios: wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
Oct 9 12:57:10 multitask nagios: wproc: stderr line 01: GNOKII Version 0.6.31
Oct 9 12:57:10 multitask nagios: wproc: stderr line 02: LOG: debug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 03: LOG: rlpdebug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 04: LOG: xdebug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 05: Config read from file /etc/gnokiirc.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 06: phone instance config:
Oct 9 12:57:10 multitask nagios: wproc: stderr line 07: model = AT
Oct 9 12:57:10 multitask nagios: wproc: stderr line 08: port = /dev/ttyACM0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 09: connection = serial
Oct 9 12:57:10 multitask nagios: wproc: stderr line 10: initlength = default
Oct 9 12:57:10 multitask nagios: wproc: stderr line 11: serial_baudrate = 19200
Oct 9 12:57:10 multitask nagios: wproc: stderr line 12: serial_write_usleep = -1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 13: handshake = software
Oct 9 12:57:10 multitask nagios: wproc: stderr line 14: require_dcd = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 15: smsc_timeout = 10
Oct 9 12:57:10 multitask nagios: wproc: stderr line 16: rfcomm_channel = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 17: sm_retry = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 18: Initializing AT capable mobile phone ...
Oct 9 12:57:10 multitask nagios: wproc: stderr line 19: Serial device: opening device /dev/ttyACM0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 20: Gnokii serial_open: open: Устройство или ресурс занято
Oct 9 12:57:10 multitask nagios: wproc: stderr line 21: Couldn't open ATBUS device: Устройство или ресурс занято
Oct 9 12:57:10 multitask nagios: wproc: stderr line 22: AT bus initialization failed (1)
Oct 9 12:57:10 multitask nagios: wproc: stderr line 23: Initialization failed (1)
Oct 9 12:57:10 multitask nagios: wproc: stderr line 24: Serial device: closing device
Oct 9 12:57:10 multitask nagios: wproc: stderr line 25: Telephone interface init failed: Command failed.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 26: Quitting.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 27: Command failed.
Oct 9 12:57:10 multitask nagios: wproc: NOTIFY job 6 from worker Core Worker 7801 is a non-check helper but exited with return code 255
Oct 9 12:57:10 multitask nagios: wproc: host=SERVER; service=(none); contact=alex
Oct 9 12:57:10 multitask nagios: wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
Oct 9 12:57:10 multitask nagios: wproc: stderr line 01: GNOKII Version 0.6.31
Oct 9 12:57:10 multitask nagios: wproc: stderr line 02: LOG: debug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 03: LOG: rlpdebug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 04: LOG: xdebug mask is 0x1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 05: Config read from file /etc/gnokiirc.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 06: phone instance config:
Oct 9 12:57:10 multitask nagios: wproc: stderr line 07: model = AT
Oct 9 12:57:10 multitask nagios: wproc: stderr line 08: port = /dev/ttyACM0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 09: connection = serial
Oct 9 12:57:10 multitask nagios: wproc: stderr line 10: initlength = default
Oct 9 12:57:10 multitask nagios: wproc: stderr line 11: serial_baudrate = 19200
Oct 9 12:57:10 multitask nagios: wproc: stderr line 12: serial_write_usleep = -1
Oct 9 12:57:10 multitask nagios: wproc: stderr line 13: handshake = software
Oct 9 12:57:10 multitask nagios: wproc: stderr line 14: require_dcd = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 15: smsc_timeout = 10
Oct 9 12:57:10 multitask nagios: wproc: stderr line 16: rfcomm_channel = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 17: sm_retry = 0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 18: Initializing AT capable mobile phone ...
Oct 9 12:57:10 multitask nagios: wproc: stderr line 19: Serial device: opening device /dev/ttyACM0
Oct 9 12:57:10 multitask nagios: wproc: stderr line 20: Gnokii serial_open: open: Устройство или ресурс занято
Oct 9 12:57:10 multitask nagios: wproc: stderr line 21: Couldn't open ATBUS device: Устройство или ресурс занято
Oct 9 12:57:10 multitask nagios: wproc: stderr line 22: AT bus initialization failed (1)
Oct 9 12:57:10 multitask nagios: wproc: stderr line 23: Initialization failed (1)
Oct 9 12:57:10 multitask nagios: wproc: stderr line 24: Serial device: closing device
Oct 9 12:57:10 multitask nagios: wproc: stderr line 25: Telephone interface init failed: Command failed.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 26: Quitting.
Oct 9 12:57:10 multitask nagios: wproc: stderr line 27: Command failed.
Perhaps you have already had similar questions, but I did not find. If you know how to solve this problem, then help me.