Questions about nagios.log
Posted: Wed Aug 07, 2024 10:36 am
I have my nagios.cfg set to rotate my nagios.log daily. And the logs appear to be rotating, at any rate new .log files are being placed in /usr/local/nagios/var/archives
However, my current nagios.log file continues to grow in size daily. While my archived logs are in the 200MB size range, nagios.log is now up to 410MB. I would expect that as the log are rotated daily, that the nagios.log file would start from 0, increasing to include only events of this 24 hour period. That's the way syslog rotation works. Also when I less nagios.log (and the archived logs as well) they all start with:
[1718110604] Nagios 4.4.13 starting... (PID=369602)
[1718110604] Local time is Tue Jun 11 08:56:44 EDT 2024
Which seems to say to me they all are starting June 11. Or rotation isn't really occurring. Why wouldn't they start on the new date of rotation?
Final question: How can I get a human readable date/time stamp on events? Stamps like "[1723036003]" (if they are timestamps) don't help me with when events occurred, and don't help with ensuring I'm looking in the .log file I intend.
Thanks much.
However, my current nagios.log file continues to grow in size daily. While my archived logs are in the 200MB size range, nagios.log is now up to 410MB. I would expect that as the log are rotated daily, that the nagios.log file would start from 0, increasing to include only events of this 24 hour period. That's the way syslog rotation works. Also when I less nagios.log (and the archived logs as well) they all start with:
[1718110604] Nagios 4.4.13 starting... (PID=369602)
[1718110604] Local time is Tue Jun 11 08:56:44 EDT 2024
Which seems to say to me they all are starting June 11. Or rotation isn't really occurring. Why wouldn't they start on the new date of rotation?
Final question: How can I get a human readable date/time stamp on events? Stamps like "[1723036003]" (if they are timestamps) don't help me with when events occurred, and don't help with ensuring I'm looking in the .log file I intend.
Thanks much.