nagios.log
Matthieu Parisot
mat at avedya.com
Wed Jun 25 18:45:35 CEST 2003
Hi,
The date is given in unix timestamp format, at the begining of each line;
You can have a more readable output using these bash functions :
disp()
{
while read; do
REPLY=${REPLY/[/};
REPLY=${REPLY/]/};
set $REPLY;
dat=$(date -d "1970-01-01 UTC $1 seconds" +"%Y-%m-%d %T ")
shift;
echo $dat $*;
done
}
logread ()
{
if ! [ $# -eq 0 ]
then
cat $* | disp
else
disp
fi
}
You just cut and paste theses funcs in your terminal (assuming you are
running bash),
then you can do :
logread nagios-05-28-2003-00.log
and then life is a bit less of a pain for you...
Regards,
Matthieu Parisot.
Jeyri Bautista wrote:
> 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