How can the Date/Time format that Nagios uses everywhere be changed to YYYY-MM-DD HH:MM:SS?

actual Nagios format

2 Answers 2


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.


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:

# 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)


Jeff Schaller: Thank you for answering.

  • 2
    Happy 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 1, 2021 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .