[rt-users] problem getting notificiations to execute

Douglas E. Warner dwarner at ctinetworks.com
Thu Jun 6 16:39:14 EDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I wrote this perl script that handles notifications for me and takes the 
output and hostname and other things as variables; but for some reason the 
strings are getting all broken up (ie, some thing like "OK - 
Packet:loss:=:0%,:RTA:=:0.17:ms" is being broken up at every space).   I'll 
paste below relevant parts of config.


== misccommands.cfg ==
# 'notify-by-automated' command definition
define command {
	command_name	notify-by-automated
	command_line	/usr/local/nagios/bin/machineadmins -H $HOSTNAME$ -N 
$NOTIFICATIONTYPE$ -S $SERVICESTATE$ -A $HOSTADDRESS$ -O "$OUTPUT$" -D 
"$DATETIME$" -s "$SERVICEDESC$"
}


# 'host-notify-by-automated' command definition
define command {
	command_name	host-notify-by-automated
	command_line	/usr/local/nagios/bin/machineadmins -H $HOSTNAME$ -N 
$NOTIFICATIONTYPE$ -S $HOSTSTATE$ -A $HOSTADDRESS$ -O "$OUTPUT$" -D 
"$DATETIME$" -h
}

== join(":", @ARGV) inside perl script ==
- -H:billmax2.int.pa.net:-N:PROBLEM:-S:CRITICAL:-A:billmax2.int.pa.net:-O:'CRITICAL:-:Plugin:timed:out:after:10:seconds':-D:'Thu:Jun:6:16:26:49:EDT:2002':-s:'PING'
- -H:billmax2.int.pa.net:-N:RECOVERY:-S:OK:-A:billmax2.int.pa.net:-O:PING:OK:-:Packet:loss:=:0%,:RTA:=:0.17:ms:-D:Thu:Jun:6:16:29:48:EDT:2002:-s:PING

== usage() from perl script ==
== machineadmins 0.1.0 ==
usage:
  machineadmins -H <hostname> -N <notification_type> -S <state>
    -A <hostaddress> -O <output> -D <date_time> (-s <serviceproblem>|-h)


- -- 
Douglas E. Warner    <dwarner at ctinetworks.com>     Network Engineer
CTI/PAdotNET         http://www.pa.net             +1 717 975 9000
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8/8hyJV36su0A0xIRAjO5AKDygPg9IkJmmHsq4++OzIlAYqzjMwCfV/f8
Ut8LatXNZZ8ow5q8tLk24L8=
=rhU5
-----END PGP SIGNATURE-----





More information about the rt-users mailing list