Search found 4 matches

by gust102
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...
by gust102
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:

Code: Select all

define command{
        command_name                    notify-roc-1
        command_line                     /usr/bin/printf "%b" "ALARM$" | tee /dev/ttyS1
}
I will try escape the dollar sign (but it woks from the Linux command prompt).
by gust102
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...
by gust102
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...