nagios log file date format

Israel Brewster israel at frontierflying.com
Thu Jul 16 23:53:39 CEST 2009


On Jul 15, 2009, at 8:23 AM, Chris Waters wrote:

> You could do something like this:
>
> Replace the paths to reflect your environment.
>
> tail -f /usr/local/nagios/var/nagios.log | perl -pe
> 's/(\d+)/localtime($1)/e'
>    or
> grep 'something important to look for'
> somelogfilewithepochtimestamps.log | perl -pe 's/(\d+)/localtime($1)/ 
> e'
>    or
> perl -pe 's/(\d+)/localtime($1)/e'  somelogfilewithepochtimestamps.log
>

Thank you! This is (for me at least) a much better approach than the  
one specified in the FAQ, in that I can (as in your first example) use  
it with tail -f for real-time monitoring when testing stuff. Any  
chance of getting this approach incorporated into the FAQ's?
-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------

>
> Chris Waters
>
> ________________________________
>
> From: shadih rahman [mailto:shadhin71 at gmail.com]
> Sent: Wednesday, July 15, 2009 9:10 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] nagios log file date format
>
>
> Is there any way to change nagios log file date format to human  
> readable
> format.  I did not see any option in nagios.cfg file.  Please advise  
> on
> this.  Thanks
>
> -- 
> Cordially,
> Shadhin Rahman
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited  
> time,
> vendors submitting new applications to BlackBerry App World(TM) will  
> have
> the opportunity to enter the BlackBerry Developer Challenge. See  
> full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 397 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090716/461c2499/attachment.bin>
-------------- next part --------------
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
-------------- next part --------------
_______________________________________________
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