nagios-snapshot: a cmdline tool for quickly grabbing nagios data

Josh Yost Josh.Yost at epsiia.com
Fri Jul 28 21:15:11 CEST 2006


Hi,
	In the spirit of giving back to the Nagians, I've put on
www.nagiosexchange.org under Utilities (called 'Snapshot') a command
line Perl tool which I wrote & have been using to parse the main
'Services Detail' page & pull back the hostname & Status Info for any
service I want (I'm too lazy to even open a browser).

It groups each service together when you run it for multiple services &
is easily customizable.  It uses a .conf file to dynamically generate
your cmdline options by what you've defined as services.  The conf file
is just:
	service+name = search string1,search string2,etc

So the output would look something like this (the email may screw up the
formatting):

$ ./nagios-snapshot --OpenSSH --OpenL --user=blah --pass=blah
######################### OpenLDAP #################################
host1                         | LDAP OK - 0.024 seconds response time
host2                         | LDAP OK - 0.008 seconds response time
host3                         | LDAP OK - 0.005 seconds response time
####################################################################

######################## OpenSSH ###################################
host1                         | SSH OK - OpenSSH_4.3 (protocol 2.0)
host2                         | SSH OK - OpenSSH_4.3 (protocol 2.0)
host3                         | SSH OK - OpenSSH_4.3 (protocol 2.0)
host4                         | SSH OK - OpenSSH_4.3 (protocol 2.0)
host5                         | SSH OK - OpenSSH_4.3 (protocol 2.0)
host6                         | SSH OK - OpenSSH_4.3 (protocol 2.0)
host7                         | SSH OK - OpenSSH_3.5p1 (protocol 2.0)
host8                         | SSH OK - OpenSSH_4.3 (protocol 2.0)
host9                         | SSH OK - OpenSSH_4.3 (protocol 2.0)
#####################################################################

There may already be something out there like this - I have no idea.
But if you use it, I hope it helps!

- Josh

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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