[Nagios-devel] Nagios::StatusLog perl module issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Nagios::StatusLog perl module issue

Post by Guest »

--00c09f986e06dea73904621db77e
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

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

--00c09f986e06dea73904621db77e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I am trying to parse nagios log using Nagios::StatusLog perl module.&nb=
sp; I am getting error while trying to parse.  I am using nagios versi=
on 3.0.6.  Any help will be much apreciated.  Thanks
#!/usr/bin/perluse strict;use Nagios::StatusLog;my $host=3D&#39=
;localhost';my $log =3D Nagios::StatusLog->new( &nb=
sp;            =
         Filename =3D> "/va=
r/log/nagios/status.dat",
            &nb=
sp;          Version =3D> 3=
.0.6           &=
nbsp;      );my $i =3D $log->info;&nbsp=
;           printf (&quot=
;Logfile created at %s unix epoch time for Nagios verion %s\n",&nb=
sp;            =
  $i->created,

            &nb=
sp;  $i->version);~       &n=
bsp;           &nbsp=
;         error=
-bash-3.2$ perl nagioslog.pl Argument "^C\0^F" isn&#3=
9;t numeric in numeric ge (>=3D) 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/N=
agios/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 unin=
itialized value in string eq at /usr/lib/perl5/site_perl/5.8.8/Nagios/Statu=
sLog.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


--00c09f986e06dea73904621db77e--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked