Hi Marius,

Just now I set the logwatch.cfg
To
C ERROR
W WARNING
W SUCCESS

Using the logwatch patterns I put the ‘state’ of the log line.
However the state of the service stays ‘critical’

Is there any way I can set the state by using only the last line ?
It’s important to have the logs, but the state must only be the current status 
not what it was in the past.

From: Dennis Sweben <[email protected]>
Date: 1-31-2017 at 09:37
To: Marius Pana <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [omd-users] Monitoring file

Hi Marius,

That would be great! Do you maybe know what steps to do?
Also I don’t really understand the logwatch.cfg

/home/myCMS.log
# C: Critical messages
# W: Warning messages
# I: ignore these lines (OK)
# R: Rewrite the output previous match. You can use \1, \2 etc. for refer to 
groups (.*) of this match
# The first match decided. Lines that do not match any pattern
# are ignored
C ERROR
W WARNING
I INFO

But ofcourse, like mentioned INFO will be ignored.

A little help would be great! ☺ Specially the rule you are talking about

Kind regards,
Dennis

From: Marius Pana <[email protected]>
Date: 1-31-2017 at 09:23
To: Dennis Sweben <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [omd-users] Monitoring file

You could create a rule and set the state to OK once you encounter the text 
INFO :)

From: Dennis Sweben <[email protected]>
Date: Tuesday, 31 January 2017 at 10:21
To: Marius Pana <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [omd-users] Monitoring file

Hi all,

As advised I setup the logwatch.
Took me a while to figure out the .cfg file etc.

Anyways, the ‘logwatch’ seems to be ‘static’ until you clear / acknowledge the 
log file.
Is there any solution to put it the state of the service back to ‘OK’ if the 
last message contains INFO?

Thanks!

From: Dennis Sweben <[email protected]>
Date: 1-30-2017 at 22:00
To: Marius Pana <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [omd-users] Monitoring file

Thank you very much Marius!
I will do this tomorrow morning when Im on the office :)
Kind regards,
Dennis Sweben

Sent from my iPhone

On 30 Jan 2017, at 21:39, Marius Pana 
<[email protected]<mailto:[email protected]>> wrote:

Hi Dennis,

I would deploy the check_mk agent on the monitoring server and use logwatch to 
achieve this. You would have to have the agent installed, logwatch configured 
and add it to be monitored.

Regards,
Marius


From: Dennis Sweben <[email protected]<mailto:[email protected]>>
Date: Monday, 30 January 2017 at 21:19
To: Marius Pana <[email protected]<mailto:[email protected]>>
Cc: 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: [omd-users] Monitoring file

Hi Marius,

thanks for your reply.
I actually was pointing more to.. monitoring a 'log' file on the 
monitoringserver itself
(omd server)
do I have to setup the agent on the omd server itself as well, and add is as 
being a... host to be monitored? And add the logfile as service to this host, 
or indeed a file monitoring or custom check indeed

I don't feel the need to setup a new server for a simple python script that'll 
run each 5 minutes or so

Kind regards,
Dennis Sweben

Sent from my iPhone

On 30 Jan 2017, at 19:08, Marius Pana 
<[email protected]<mailto:[email protected]>> wrote:
Depending on the frequency that you write to that file logwatch may be the 
easier solution: https://mathias-kettner.de/checkmk_logfiles.html
You may also want to look at writing a local check: 
https://mathias-kettner.de/checkmk_localchecks.html

Cheers,
Marius

From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Dennis Sweben <[email protected]<mailto:[email protected]>>
Date: Monday, 30 January 2017 at 17:06
To: 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [omd-users] Monitoring file

Hi all,

I made a python script that does a login to a custom server.
I would like to monitor a file that it can write.

The file will contain a string, Online
Or
Offline

I can run this on the monitoring server itself using a cronjob or whatever.

Whats the best way to monitor the output of this ‘local file’ on the 
monitoring-server itself?

I do want to have Ok, Unknown, Critical for this and trigger notifications etc.

Kind regards,
Dennis
_______________________________________________
omd-users mailing list
[email protected]<mailto:[email protected]>
http://lists.mathias-kettner.de/mailman/listinfo/omd-users
_______________________________________________
omd-users mailing list
[email protected]<mailto:[email protected]>
http://lists.mathias-kettner.de/mailman/listinfo/omd-users
_______________________________________________
omd-users mailing list
[email protected]
http://lists.mathias-kettner.de/mailman/listinfo/omd-users

Reply via email to