FW: Howto replace epoch secs in nagios.log by human readable date ?

Subhendu Ghosh sghosh at sghosh.org
Mon Jul 25 16:00:13 CEST 2005


Sorry the log format is fixed as all the reporting cgis depend on the 
epoch field.

-sg

On Mon, 25 Jul 2005 Ralph.Grothe at itdz-berlin.de wrote:

> Sorry for the mispost.
> Of course I meant to send it to nagios-users.
>
> -----Original Message-----
> From: Grothe, Ralph
> Sent: Monday, July 25, 2005 3:05 PM
> To: Nagiosplug-Help-Admin (E-Mail)
> Subject: Howto replace epoch secs in nagios.log by human readable
> date?
>
>
> Hi,
>
> after some major configuration changes I sent nagios a sighup.
>
> To check if it got caught I had a look at nagios.log.
>
> Then I realized that it is rather inconvenient to always having
> to do some conversion like such
> to find out when messages got written.
>
> [nagios at daisy:~/etc]
> $ perl -anle 'print scalar localtime(($F[0]=~/(\d+)/)[0]) if eof'
> /var/opt/nagios/log/nagios.log
> Mon Jul 25 14:53:37 2005
>
>
> I'm sure one can select a custom (or common logfile format)
> similar to Apache.
> Can one?
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> 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
>

-- 



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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