Nagio & TEC
Fabio Iovine
fabio.iovine at gmail.com
Mon Sep 3 15:10:18 CEST 2007
hi all,
I need to forward Nagios alarm events to TEC (Tivoli Enterprise Monitor).
For this reason I wrote a couple of shell-scripts to handle Nagios
servicestate and change them in TEC suitable severity codes.
Then I try to forward these event to TEC by using a Tivoli command but
I have problems with SERVICEOUTPUT/HOSTOUTPUT which are truncated.
let's make some fixed points; these are the twho commands I defined in
my commands.cfg file:
# 'service-notify-by-postemsg' command definition
define command{
command_name service-notify-by-postemsg
command_line $USER3$/service-nagios-postemsg.sh `$DATE$` `$TIME$` `$HO
STNAME$` `$SERVICESTATE$` `$SERVICEOUTPUT$`
}
# 'host-notify-by-postemsg' command definition
define command{
command_name host-notify-by-postemsg
command_line $USER3$/host-nagios-postemsg.sh $DATE$ $TIME$ $HOSTNAME$
$HOSTSTATE$ $HOSTOUTPUT$
}
the two files have the following inside them:
date=$1
time=$2
hostname=$3
servicestate=$4
serviceoutput=$5
postemsg -f $post_conf_file -r $severity -m "$date : $time :
$serviceoutput" hostname=$hostname Nagios NAGIOS
---
date=$1
time=$2
hostname=$3
hoststate=$4
hostoutput=$5
postemsg -f $post_conf_file -r $severity -m "$date : $time :
$hostoutput" hostname=$hostname Nagios NAGIOS
for those who are notfamiliar with Tivoli, the "-m" is the message flag;
what really happen to me is that the $hostoutput wich should contain
the $HOSTOUTPUT$ text is truncated right after the first word, for
istance:
$HOSTOUTPUT$ = JMX ATTRIBUTE CRITICAL -
jboss.j2ee:jndiName=ejb/GameTransactionSystem,service=EJB-StateString:
become $hostoutput = JMX
do you have any idea?
thanx in advance,
Fabio
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list