Problem with nagios logs

Marc Powell marc at ena.com
Thu Sep 16 20:15:44 CEST 2004


----Original Message----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of YAVUZ
TEMIZKAN Sent: Thursday, September 16, 2004 11:32 AM To:
nagios-users at lists.sourceforge.net Subject: [Nagios-users] Problem with
nagios logs 

> Hi folks,
> 
> Currently i have an intention to parse nagios log files according to
> hosts and/or time. But my problem is that nagios logs the time
> according to unix time i mean like this: [1095351602] Auto-save of
> retention data completed successfully. [1095351882] HOST FLAPPING
> ALERT: www.someurl.com;STOPPED; Host appears to have stopped flapping
> (0.0% change < 5.0% threshold)   
> 
> İ have to change these logs to normal time ie
> 16-09-2004 19:28:59 EEST 2004
> 
> However i have nearly 6 months logs and this will be too much time
> consuming even if done with a script.(i have a script to translate
> this time written in perl)  
> 
> What i want to find out is  how can we change the logging format in
> nagios ( cant find anything useful in nagios.log) 


You cannot, it's hard-coded and many of the CGI's rely on the timestamps being in that format. If you want to change it you'll need to edit the base and cgi code and recompile. In what way is a scripted usage of full dates easier than working with unix timestamps? I'm just curious.

--
Marc



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.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