nagios.log
Jason Lancaster
jlancaster at affinity.com
Wed Jun 25 19:33:05 CEST 2003
This should work for just about anything with a timet format.
1. Create program called timet.pl.
2. tail -f nagios.log | ./timet.pl
#!/usr/bin/perl
while (<STDIN>) {
$_ =~ /\D(\d{10})\D/;
$time = scalar localtime($1);
$_ =~ s/\D(\d{10})\D/\[$time\]/g;
print "$_";
}
-Jason
----- Original Message -----
From: "Jeyri Bautista" <jbautista at icnet.com.ve>
To: <nagios-users at lists.sourceforge.net>
Sent: Wednesday, June 25, 2003 11:42
Subject: [Nagios-users] nagios.log
> Hi, when i see the nagios.log files, where can I see the event time
> (hour,minutes,seconds),
>
> Thanks,
>
> Jeyri
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> 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
>
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
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