2009
12.22
12.22
As I don’t think in seconds about time and more like hours days etc. I’ve added this small bit of code to Nagios check_file_age script to display age in days. I’m using this to check PID file age for service that needs daily/weekly restarts.
By default you will get something like this:
FILE_AGE CRITICAL: /var/run/server.pid is 457395 seconds old and 4 bytes
I’m to lazy to calculate this
Find this line in the code:
and replace it with:
Now you will get:
FILE_AGE CRITICAL: /var/run/server.pid is 457381 seconds (5.3 days) old and 4 bytes
Much nicer
No Comment.
Add Your Comment