Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

schymanski

Reviews(1)
NRDP - Nagios Remote Data Processor
we use this script for multiple lines of output:
define command {
command_name notify-service-by-nrdp
command_line /path/send_nrdp.sh "$HOSTNAME$" "$SERVICEDESC$" $SERVICESTATEID$ "$SERVICEOUTPUT$ $LONGSERVICEOUTPUT$" "$SERVICEPERFDATA$"
}


/path/send_nrdp.sh:

#!/bin/bash

TEST=$(echo "$4 | $5" | sed 's/$/\n/' | tr -d "\r\n" )

/usr/local/nrdp/clients/send_nrdp.php --url=http://1.1.1.1/nrdp --token=xyzterw --host="$1" --service="$2" --state="$3" --output="$TEST"