monitoring-plugins icon indicating copy to clipboard operation
monitoring-plugins copied to clipboard

logfile: Multiple checks on the same file produce undesired results

Open drapiti opened this issue 2 years ago • 0 comments

This issue respects the following points:

  • [X] This is a bug, not a question or a setup/configuration issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] I use the latest release of the Monitoring Plugins (https://github.com/Linuxfabrik/monitoring-plugins/releases).
  • [X] I agree to follow Monitoring Plugins's Code of Conduct.

Which variant of the Monitoring Plugins do you use?

  • [X] .rpm/.deb package from repo.linuxfabrik.ch
  • [ ] Compiled for Linux (.tar/.zip from download.linuxfabrik.ch)
  • [X] Compiled for Windows (from download.linuxfabrik.ch)
  • [ ] Source Code from GitHub

Bug description

The logfile plugin (latest version) uses the filename as a key when checking previous occurrences, however this invalidates the check if for example I need to check two seperate conditions for two seperate instances in time using the same filename. The ideal solution would be to include the condition or a hash of each condition so that it tracks multiple bookmarks for each condition.

Steps to reproduce - Plugin call

.\logfile.exe --alarm-duration 120 --critical 1 --critical-regex '^(?:(?!Inizio del Processing).)*$' --filename 'C:\Users\test\Desktop\NEW_TEST\pluto.log'

Steps to reproduce - Data

Environment

currently working on windows server 2019 but os is irrelevant.

Plugin Version

logfile: v2023051201 by Linuxfabrik GmbH, Zurich/Switzerland

Python version

No response

List of Python modules

Additional Information

drapiti avatar Aug 01 '23 13:08 drapiti