Skip to content

logfile: Multiple checks on the same file produce undesired results #698

@drapiti

Description

@drapiti

This issue respects the following points:

Which variant of the Monitoring Plugins do you use?

  • .rpm/.deb package from repo.linuxfabrik.ch
  • Compiled for Linux (.tar/.zip from download.linuxfabrik.ch)
  • 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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions