Nagios archives/ log rotation file syntax

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
pzkpfw
Posts: 1
Joined: Tue Apr 26, 2022 2:22 am

Nagios archives/ log rotation file syntax

Post by pzkpfw »

When I look in archives/ the files look like this:

Code: Select all

-rw-r--r-- 1 nagios nagios 664K Apr 24 01:58 nagios-04-24-2022-00.log
-rw-r--r-- 1 nagios nagios 664K Apr 25 01:58 nagios-04-25-2022-00.log
-rw-r--r-- 1 nagios nagios 884K Apr 26 01:59 nagios-04-26-2022-00.log
I'd like this date syntax to mirror what I've set in nagios.cfg, i.e. date_format=iso8601

How can I make sure the files are archived with a syntax more like:

Code: Select all

nagios-2022-04-26.log
I understand I could just skip Nagios own log rotation and use external log rotation, but I'd like to know if there's an easier way to just set it in Nagios first.
Locked