1

I'm trying to use Check_MK's logwatch to send a critical alert (C) if a given pattern (e.g., EOFException) is found in a large number (~1000) of Jenkins log files. For this, I have created the following simple logwatch.cfg file:

/var/opt/builddata/jenkins/jobs/*/builds/lastFailedBuild/log
 C EOFException

While this basically works, I now get a new service in Check_MK for every log file, completely cluttering the GUI.

Is there any way to configure Check_MK to watch multiple log files as a single service?

dokaspar
  • 8,186
  • 14
  • 70
  • 98

1 Answers1

0

Even though this question is very old, the answer should be this logwatch.groups.

Unfortunately this help page is not very helpful. But it is relatively easy to use this. You basically only have to put a text file "fileinfo.cfg" in the same folder and define there which files are a group.

/etc/check_mk/fileinfo.cfg:

/var/log/apache2/error.log
/var/log/apache2/error.log-*

Now, you can use "File Grouping Patterns" in Checkmk to define group names fileinfo.groups. WATO -> Host & Service Parameters -> search for "fileinfo.groups"

Futti
  • 15
  • 6