Nagios and Tivoli

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
harish_acc
Posts: 4
Joined: Wed Oct 13, 2010 2:23 am

Nagios and Tivoli

Post by harish_acc »

Hi,

Currently we have Tivoli monitoring tool which is already inplace to monitor few things.

Now I have requirement like can Nagios be able to read the output (alerts) of Tivoli and display it in a nagios dashboard??

Appreciate if you could respond as early as possible.

Thanks,
Harish
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Nagios and Tivoli

Post by mmestnik »

It can, the question becomes how. We are just now working on some documentation on setting up and configuring NSCA as well as making use of it from other applications like but not including Tivoli. Here is an example script that you can have Tivoli invoke:

Code: Select all

#!/bin/sh
hostname=banker.local; # Change this to be the name/address of your NSCA/Nagios server.
myhostname=test321; # Change this to be the Nagios Hostname used to describe the Node in Nagios.
# Note LogDog hard-coded below is the name of the service, optionally can be replaced with a
#        command line parameter.
shift state; # This loads the first argument into $state.  Should be one of 0, 1, 2, 3.
# 0 == Ok.
# 1 == Warning.
# 2 == Critical.
# 3 == Unknown.
# Note this is where you would shift your servicename.
message=”$*”; # This loads any renaming arguments into a space padded string $message.
# Make sure some things are in path, like the location of send_nsca.
PATH=”/usr/sbin:$PATH”
printf “%s\tLogDog\t%i\t%s\n" “$myhostname” “$state” | send_nsca -H “$hostname”
We are just now starting on the setup and configure NSCA documentation, though there is plenty of that around already.

NSCA can also be used to submit host check results and do batch runs. You could for example once every min push/replicate your Tivoli status to Nagios.

If Tivoli has logs to syslog, you may want to take a look at LogDog:
Place this inside your alerts section, make sure that “section: alerts” appears only once. Replace <myhostname> with the Nagios designation for the Host and <hostname> with the name/IP of the NSCA/Nagios server.

Code: Select all

section: alerts 
	NagiosOk => printf "<myhostname>\tLogDog\t0\t%s\n" "MESSAGE" |/usr/sbin/send_nsca -H "<hostname>"
	NagiosWarn => printf "<myhostname>\tLogDog\t1\t%s\n" "MESSAGE" |/usr/sbin/send_nsca -H "<hostname>"
	NagiosCrit => printf "<myhostname>\tLogDog\t2\t%s\n" "MESSAGE" |/usr/sbin/send_nsca -H "<hostname>"
	NagiosUnkn => printf "<myhostname>\tLogDog\t3\t%s\n" "MESSAGE" |/usr/sbin/send_nsca -H "<hostname>"
Then use these in “section: monitors ” as appropriate.
Locked