Notausstieg0309 / checkmk-plugin-access-logs

A check plugin for CheckMK monitoring solution to check HTTP response codes via analyzing access logs (Apache, Tomcat, Nginx, etc.)
GNU General Public License v3.0
1 stars 4 forks source link

Cannot read custom log files #1

Closed sanderbohm closed 2 years ago

sanderbohm commented 2 years ago

Dear,

I'm trying to use this plugin, but my log files has a slightly different name; hostname_access.log and looks like the plugin isn't finding the log file then.

I've changed it in the: /usr/lib/check_mk_agent/plugins/access_logs_2.py and access_logs.py

the following line

"/var/log/apache2/*_access.log",

Now It works is this a variable in one of the setup fields? Or can you change the line of code in both files?

Kind Regards, Sander

Notausstieg0309 commented 2 years ago

You can configure custom log file paths in addition to the defaults via a separate config file access_logs.conf that must be placed in the config directory of your CheckMK agent (typically /etc/check_mk/access_logs.conf:

log_files = ["/var/log/apache2/*_access.log"]

This way the agent plugin searches for the default locations and your custom locations as well.

Best Regards Markus