Replies: 12 comments
-
After knowing about the different call signature, the challenge was to adjust the Icinga configuration appropriately to support both variants. As we didn't find a way to inquire the information at runtime which package version would be installed, like $ dpkg-query --show --showformat '${Package} ${Version}\n' monitoring-plugins-contrib
monitoring-plugins-contrib 37.20220312 we decided to introduce and propagate another flag to from the host object to the service object and further to the command object. Based on this flag, the call signature to the Hereby, we are sharing the corresponding configuration snippets. Hopefully, they will be helpful to all people who are in need of them.
|
Beta Was this translation helpful? Give feedback.
-
Another option would have been not to swap in the program under the same name 1 while retiring the old one. In this case, the program would be installed as Footnotes |
Beta Was this translation helpful? Give feedback.
-
Dear @Flowdalic, we can see that you acknowledged our original post, thank you. Can we humbly ask you to forward the relevant information to the Debian issue tracker if you can find some minutes? Maybe it will be enough to refer to this ticket? Thank you in advance and with kind regards, |
Beta Was this translation helpful? Give feedback.
-
Thanks for your report @amotl |
Beta Was this translation helpful? Give feedback.
-
Dear Davide, thank you for your kind reply on this issue. We just pinged @bzed and @waja about it at bzed/pkg-nagios-plugins-contrib#93, trying to condense the relevant information further. We would like to have them and Peter Palfrader have their verdict what would be best for the Debian vendoring as we are not accustomed to the corresponding details. However, we wanted to share our thoughts on the two different aspects which make the new implementation of 1. Threshold value evaluation inversion
We don't know about a good solution to the aspect of the 1.1. Messy workaroundMaybe it will be sufficient to advise adding this snippet to the CheckCommand configuration section?
However, people who are not aware of this will experience "silent corruption". 1.2. Break things instead of screwing things upLike mentioned at #104 (comment), a safer option would be to adjust the retirement commit bzed/pkg-nagios-plugins-contrib@eadc7856 to ship the program as 2. Threshold value syntaxThe other aspect are the additional
If it would fit the semantics of your program, would it be possible to make those colon characters optional? In this manner, we could reduce the footprint of the workaround at least slightly. With kind regards, |
Beta Was this translation helpful? Give feedback.
-
As described in the official nagios documentation, the two syntaxes are not equivalent: |
Beta Was this translation helpful? Give feedback.
-
Hii, I am in the same boat, migration hosts from Debian 11 to Debian 12, and now the memory checks fail. But, with a little ternary shell logic things can work on both versions. Instead of this: /usr/lib/nagios/plugins/check_memory -w 20% -c 10% we now use this: /usr/lib/nagios/plugins/check_memory "$(( $(lsb_release -rs) < 12 )) && echo -w 20% -c 10% || echo -a -w 20%: -c 10%:" We use the check_by_ssh wrapper, so in reality the command_line /usr/lib/nagios/plugins/check_by_ssh -q -t 60 -H '$HOSTADDRESS$' '/usr/lib/nagios/plugins/check_memory "$(( $(lsb_release -rs) < 12 )) && echo -w $ARG1$ -c $ARG2$ || echo -a -w $ARG1$: -c $ARG2$:"' |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the report. So weird. I'll check ASAP. |
Beta Was this translation helpful? Give feedback.
-
Can you open a new issue please? |
Beta Was this translation helpful? Give feedback.
-
My comment/workaround was more meant for reference by others that start using Debian 12 and end up in the same situation. The problem is not so much with this/your script, but rather with the choice of Debian to move from one script to another (incompatible) script. |
Beta Was this translation helpful? Give feedback.
-
It's not incompatible, but you might need to parameter it in another way. And yes, it requires to adjust your configuration. |
Beta Was this translation helpful? Give feedback.
-
Well, there were basically two options: drop the old one, have the new one under a different name. Or replace the old one. If there is a patch to make the new version compatible to the old one without breaking things, I'll happilly apply it. |
Beta Was this translation helpful? Give feedback.
-
Dear Davide,
first things first: Thanks a stack for conceiving and maintaining this collection of excellent check programs.
Introduction
Because this is absolutely not a bug report related to your software at all, please apologize for not using the issue template. It is merely a report where we want to share some observations and caveats when operating Icinga on Debian machines and upgrading to newer releases like Debian bullseye. In this manner, we are humbly asking you to label this issue with
info
,support
or similar and close it right away if you see fit.Observations
It looks like the
nagios-plugins-linux
Debian source package recently vendored your monitoring programs 1, effectively replacing its previouscheck_memory
program. It happened with those commits:@Flowdalic already reported that to the Debian bugtracker at #1005908:
So, effectively, for Debian users transitioning to
nagios-plugins-contrib >= 36.20211207
, the check semantics will be inverted. This is a somewhat unfortunate change for them.Mitigations
As it is not really a bug report (your software works perfectly fine at all!) but more a support recipe for the community, our main aim is to share the steps we took to mitigate this problem on an Icinga instance monitoring systems running both old and new versions.
So, to all people using
nagios-plugins-contrib
ormonitoring-plugins-contrib
on Debian: Thecheck_memory
program by @madrisan has the--available
option which should be used in this context of making the program's behavior compatible with the previous variant written in Perl. However, the program's--warning|--critical
threshold control options will also need slight adjustments.Effectively, if that command would have worked before:
people should now use an invocation like that:
Closing words
We hope you appreciate our report here despite the report should go to Debian instead. We will check how to respond to the original ticket at #1005908 properly, referencing this issue. If someone from the community can also do that, we will be more than happy.
With kind regards,
Andreas.
Footnotes
https://salsa.debian.org/nagios-team/pkg-nagios-plugins-contrib/-/tree/master/madrisan-nagios-plugins-linux ↩
Beta Was this translation helpful? Give feedback.
All reactions