How can the Date/Time format that Nagios uses everywhere be changed to YYYY-MM-DD HH:MM:SS?
Asked
Active
Viewed 280 times
2 Answers
4
A date/time format of "YYYY-MM-DD HH:MM:SS" is configurable in the main configuration file with the date_format option set to iso8601:
This option allows you to specify what kind of date/time format Nagios should use in the web interface and date/time macros. Possible options (along with example output) include:
Option Output Format Sample Output us MM/DD/YYYY HH:MM:SS 06/30/2002 03:15:00 euro DD/MM/YYYY HH:MM:SS 30/06/2002 03:15:00 iso8601 YYYY-MM-DD HH:MM:SS 2002-06-30 03:15:00 strict-iso8601 YYYY-MM-DDTHH:MM:SS 2002-06-30T03:15:00
You will need to restart Nagios for the change to take effect.
Jeff Schaller
- 66,199
- 35
- 114
- 250
0
As usual, it was easy, if you know where to look.
In the configuration file: /usr/local/nagios/etc/nagios.cfg
It was self documented on the configuration file:
# DATE FORMAT OPTION
# This option determines how short dates are displayed. Valid options
# include:
# us (MM-DD-YYYY HH:MM:SS)
# euro (DD-MM-YYYY HH:MM:SS)
# iso8601 (YYYY-MM-DD HH:MM:SS)
# strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
#
date_format=us
Jeff Schaller: Thank you for answering.
amm
- 45
- 4
-
2Happy to help! There's no need to add an additional Answer if it just says the same thing as another one. The fact that it's upvoted or has a checkmark is an indication to the SE system that this question is Answered. Thanks! – Jeff Schaller Dec 01 '21 at 14:33
