Nagios::StatusLog perl module issue

shadih rahman shadhin71 at gmail.com
Wed Feb 4 21:35:30 CET 2009


I am trying to parse nagios log using Nagios::StatusLog perl module.  I am
getting error while trying to parse.  I am using nagios version 3.0.6.  Any
help will be much apreciated.  Thanks





#!/usr/bin/perl
use strict;
use Nagios::StatusLog;
my $host='localhost';

my $log = Nagios::StatusLog->new(
                       Filename => "/var/log/nagios/status.dat",
                       Version => 3.0.6
                  );
my $i = $log->info;
            printf ("Logfile created at %s unix epoch time for Nagios verion
%s\n",
               $i->created,
               $i->version);
~



error


-bash-3.2$ perl nagioslog.pl
Argument "^C\0^F" isn't numeric in numeric ge (>=) at
/usr/lib/perl5/site_perl/5.8. 8/Nagios/StatusLog.pm line 149.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.8.8/Nagios/StatusLog.pm line 185.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.8.8/Nagios/StatusLog.pm line 185.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.8.8/Nagios/StatusLog.pm line 185.
Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.8/Nagios/StatusLog.pm line 217.
unknown tag () in logfile at nagioslog.pl line 6


-- 
Cordially,
Shadhin Rahman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090204/d2fd067b/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
-------------- next part --------------
_______________________________________________
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