Search found 4 matches
- Tue Mar 03, 2015 3:41 pm
- Forum: Open Source Nagios Projects
- Topic: Notification (misc) command, send string to serial port
- Replies: 4
- Views: 2159
Re: Notification (misc) command, send string to serial port
I managed to solve it by embedding it in a script, with the string ALARM as a parameter. Script: #!/bin/bash /usr/bin/printf "%b" "$1"$ | tee /dev/ttyS1 Definition: define command{ command_name notify-roc-1 command_line /usr/lib/nagios/plugins/notify_roc_1.sh ALARM } Thanks for a...
- Tue Mar 03, 2015 6:42 am
- Forum: Open Source Nagios Projects
- Topic: Notification (misc) command, send string to serial port
- Replies: 4
- Views: 2159
Re: Notification (misc) command, send string to serial port
This is my latest try:
I will try escape the dollar sign (but it woks from the Linux command prompt).
Code: Select all
define command{
command_name notify-roc-1
command_line /usr/bin/printf "%b" "ALARM$" | tee /dev/ttyS1
}- Mon Mar 02, 2015 9:21 am
- Forum: Open Source Nagios Projects
- Topic: Notification (misc) command, send string to serial port
- Replies: 4
- Views: 2159
Notification (misc) command, send string to serial port
We have a device, who can be triggered via serial communication, to call or send text message in GSM mobile network. To trigger this, I just send string 'ALARM$' to serial port: /bin/echo 'ALARM$' > /dev/ttyS1 If I do this from the Linux promt (logged in as user nagios), it works fine. But, if I add...
- Mon Mar 02, 2015 8:57 am
- Forum: Open Source Nagios Projects
- Topic: Notification command, send string to serial port
- Replies: 1
- Views: 837
Notification command, send string to serial port
We have a device, who can be triggered via serial communication, to call or send text message in GSM mobile network. To trigger this, I just send string 'ALARM$' to serial port: /bin/echo 'ALARM$' > /dev/ttyS1 If I do this from the Linux promt (logged in as user nagios), it works fine. But, if I add...