- marked as enhancement
timestamp lacks year when logging to file
Monit can log to file or to syslog, if the directory “set log” is in your rc file. According to the documentation (and the source) the format is fixed and contains a [date]
part like this: [CET Jan 5 18:49:29]
This is ambiguous for long running systems, especially in the embedded world devices might run over years without outage. You can not tell for certain from the log file when a certain event has happened, because there is no year in the time stamp. You can also not tell if the time is set to a reasonable value on that device for the same reason: Is it 1970 (quite common for devices without Real Time Clock (RTC)) or 1984 or 2020? You don’t know, at least not when looking at the Monit logfile.
Please make this either configurable or set it to a sane format, e.g. like proposed by ISO standard 8601, for example:
% date --iso-8601=seconds 2020-05-13T15:26:42+02:00
This affects all versions known to this Git repo, the current timestamp format has not changed since the very first commit.
Comments (2)
-
repo owner -
repo owner - changed status to resolved
fix Issue
#894: If monit is logging to a file: add a year to the timestamp.→ <<cset a642db923392>>
- Log in to comment