Monit log date format configurable ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Monit log date format configurable ?

Ani A
Hello,

The default log format of Monit has date in the form

[CET Jan  5 18:49:29]

Which is probably:
 timezone(%Z) month(%b) day(%e) Time(%T)

Is there a way to configure this, such that it aligns with other
logs in my server ?
All my other daemon logs are in this form:
   2020-08-06 10:45:24.259

(It will be easier to grep and correlate logs if all logs are in the
same format)

--
Regards,
A. Aniruddha

Reply | Threaded
Open this post in threaded view
|

Re: Monit log date format configurable ?

Tino Hendricks-2
Hi Ani,

according to
https://mmonit.com/monit/documentation/monit.html#LOGGING
can you tell monit so use syslog where you can tailor the format to your needs.

Best

Tino

> Am 12.08.2020 um 14:25 schrieb Ani A <[hidden email]>:
>
> Hello,
>
> The default log format of Monit has date in the form
>
> [CET Jan  5 18:49:29]
>
> Which is probably:
> timezone(%Z) month(%b) day(%e) Time(%T)
>
> Is there a way to configure this, such that it aligns with other
> logs in my server ?
> All my other daemon logs are in this form:
>   2020-08-06 10:45:24.259
>
> (It will be easier to grep and correlate logs if all logs are in the
> same format)
>
> --
> Regards,
> A. Aniruddha
>


Reply | Threaded
Open this post in threaded view
|

Re: Monit log date format configurable ?

Ani A
In reply to this post by Ani A
Thanks Tino,

So, I will have to use a separate facility level if I have to redirect
them to a file.
Will try that.

--
Regards,
A. Aniruddha