Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow inverted Levels for New Files/Filesize on lnx_backup for checkmk 2.0 #17

Open
zobe123 opened this issue Jan 4, 2024 · 2 comments
Assignees

Comments

@zobe123
Copy link

zobe123 commented Jan 4, 2024

Hallo,

ich möchte dein Plugin gerne dazu verwenden einen Backup Job mit rsync zu überwachen, leider passt hier aber der "Service state" dann nicht (ist genau umgekehrt) Idealerweise wäre zB: "New Files:0" OK alle anderen Werte dann WARN/CRIT.
Kann ich das irgendwie einstellen oder kannst du mir sagen wie ich das plugin anpassen kann?

@mape2k mape2k self-assigned this Mar 26, 2024
@mape2k
Copy link
Owner

mape2k commented Mar 26, 2024

Hallo @zobe123 ,

das kann das Plugin aktuell nicht, weil new files ein Minimum-Wert ist. Du kannst in der Datei

lib/check_mk/base/plugins/agent_based/lnx_backup.py

die Zeile 129

'new_files': ('New Files', str, True, True, False),

in

'new_files': ('New Files', str, True, False, True),

ändern. Damit sind dann die Schwellwerte maximal und ein WARN = 1, CRIT = 2 erzeugt WARN ab 1 und CRIT ab 2.
Aber das geht natürlich bei Updates verloren. Ich lasse die Meldung von dir mal offen und überlege nochmal, welche Möglichkeiten es gäbe, dass einzubauen.

@mape2k mape2k changed the title New Files/Filesize Issue on lnx_backup for checkmk 2.0 Allow inverted Levels for New Files/Filesize on lnx_backup for checkmk 2.0 Mar 26, 2024
@zobe123
Copy link
Author

zobe123 commented Mar 27, 2024

Vielen Dank, habs gerade angewendet und funktioniert einwandfrei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants