check_logfile log rotation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

check_logfile log rotation

Post by tgfde »

Hello,

I'm currently using the 'check_logfiles' plugin but having a hard figuring the rotation format for a weblogic server. The rotation format is shown below:

ms1.log -> ms1.log.00001 -> ms1.log.00002

Has anyone figured it out or know it? Thanks in advanced.
FYI. I sent an email to the third party for this plugin, and waiting for a response, but just wanted tot see if anyone has done this.

tgfde
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_logfile log rotation

Post by sreinhardt »

Do you have a link to the plugin available?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: check_logfile log rotation

Post by tgfde »

sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_logfile log rotation

Post by sreinhardt »

Well according to their plugin, it would be something like "msg1.logmsg1.log.00001msg1.log.00002". It's pretty hard to tell from their documentation what correct usage would be. However, if you only ever need to look at the first log file, using no pattern would be just fine as well.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: check_logfile log rotation

Post by tgfde »

Thank you for the quick response. I will try this if the one provided by lausser from ConSol Labs, shown below.

logfile => ‘ms1.log’,
rotation => ‘ms1\.log\.\d{5}’,
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_logfile log rotation

Post by sreinhardt »

That should do it, provided it is looking for an actual regex, and not what they were showing through documentation.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked