<br>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<br><br><br><br><br><br clear="all">
#!/usr/bin/perl<br>use strict;<br>use Nagios::StatusLog;<br>my $host='localhost';<br><br>my $log = Nagios::StatusLog->new(<br> Filename => "/var/log/nagios/status.dat",<br>
Version => 3.0.6<br> );<br>my $i = $log->info;<br> printf ("Logfile created at %s unix epoch time for Nagios verion %s\n",<br> $i->created,<br>
$i->version);<br>~ <br><br><br><br>error<br><br><br>-bash-3.2$ perl nagioslog.pl <br>Argument "^C\0^F" isn't numeric in numeric ge (>=) at /usr/lib/perl5/site_perl/5.8.<div>
8/Nagios/StatusLog.pm line 149.<br>
Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.8/Nagios/StatusLog.pm line 185.<br>Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.8/Nagios/StatusLog.pm line 185.<br>Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.8/Nagios/StatusLog.pm line 185.<br>
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/Nagios/StatusLog.pm line 217.<br>unknown tag () in logfile at nagioslog.pl line 6</div><br clear="all"><br>-- <br>Cordially,<br>
Shadhin Rahman<br>