Timestamp in logs

Andreas Ericsson ae at op5.se
Tue Apr 27 15:18:00 CEST 2004


Upayavira wrote:
> My nagios.log file shows the timestamp in integer form, such as:
> [1083063994] SERVICE NOTIFICATION........
> 
> How can I switch it to show a more human readable timestamp?
> 
Hack the source.

The reason for using unix timestamps (in seconds since the unix epoch) 
is because it's easy to parse and calculate differences between them. If 
humans were supposed to read the log-files the timings would have been 
different. Feed the logs to a script of you want to read them manually.

If it's any help, the timestamp is in seconds since the unix epoch 
(January 1, 1970) and the 'UNIX Billenium' (when the digits passed 
1000000000) occured on September 9, 2001.

> Other than this, I seem to have a fully working Nagios, with alerts by 
> SMS, monitoring of load on multiple servers, etc, etc, which I am 
> delighted with.
> 
> Regards, Upayavira

-- 
Mvh
Andreas Ericsson
OP5 AB
+46 (0)733 709032
andreas.ericsson at op5.se


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
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