having different "view" in nagios interface

Paul Weaver paul.weaver at bbc.co.uk
Thu Feb 12 16:55:59 CET 2009


> thank u very much
> Does someone have a piece of software that use 
> Nagios::Statuslog to share?

perl -e '
use Nagios::StatusLog;
my $host = "hostname";
my $description = "service description";
my $dataFile = "/usr/local/nagios/var/status.dat";

my $log = Nagios::StatusLog->new( Filename => $dataFile, Version =>
2.0);
my $obj = $log->service( $host, $description );

print "Service $description on $host is in state
".$obj->{last_hard_state}."\n";
print "* This has been acknowleged\n" if
$obj->{problem_has_been_acknowledged};
'

------------------------------------------------------------------------------
_______________________________________________
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