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

disk check in icinga2/itl/command-plugins.conf lacks order tags #5714

Closed
hrld opened this issue Nov 2, 2017 · 7 comments
Closed

disk check in icinga2/itl/command-plugins.conf lacks order tags #5714

hrld opened this issue Nov 2, 2017 · 7 comments
Labels
area/itl Template Library CheckCommands bug Something isn't working
Milestone

Comments

@hrld
Copy link
Contributor

hrld commented Nov 2, 2017

Expected Behavior

using disk check with -W/-K arguments notices running out of inodes.

Current Behavior

disk check might or might not notify you for running out of inodes.

Possible Solution

-W and -K need "order = -3" just like -c/-w arguments. I'm not sure if any other arguments also need to be BEFORE -A/-p.
Currently -p has "order = 1", also setting that for -A should also help.
Probably both changes make sense and lead to less unexpected behavior.

Steps to Reproduce (for bugs)

Icinga2 called the disk check like this:
/usr/lib/nagios/plugins/check_disk -c 10% -w 20% -A -K 10 -W 20
-K and -W get ignored because they are behind -A.

Your Environment

Bug still visible in latest git at this time.

@Crunsher Crunsher added the area/itl Template Library CheckCommands label Nov 3, 2017
@Crunsher
Copy link
Contributor

Crunsher commented Nov 3, 2017

Which version of the plugins are you running?
Also feel free to submit a patch ☺️

@hrld
Copy link
Contributor Author

hrld commented Nov 3, 2017

pull request created: #5717

monitoring-plugins-basic package is 2.1.1 on the host where I tested. But as the argument order based behavior of check_disk actually makes sense I do not expect changes on that side. (https://github.com/monitoring-plugins/monitoring-plugins/commits/master/plugins/check_disk.c shows no relevant changes)

@dnsmichi
Copy link
Contributor

One question - is the order between -p and -A important?

@dgoetz
Copy link
Contributor

dgoetz commented Dec 19, 2017

@dnsmichi: No, only all threshold parameters need to be before all parameters for partitions. -A always overrides -p independent of ordering, -X/-N is also always taken. But a really special one would be -C for clearing thresholds so you could do something like check_disk -w 100 -c 50 -C -w 1000 -c 500 -p /foo -C -w 5% -c 3% -p /bar.

@dnsmichi
Copy link
Contributor

So getopts for this plugin is broken, a feature monster. Understood, thanks for the explanation.

@dnsmichi dnsmichi added the bug Something isn't working label Dec 19, 2017
@dnsmichi dnsmichi added this to the 2.9.0 milestone Dec 19, 2017
@mcktr
Copy link
Member

mcktr commented Dec 27, 2017

Is this issue fixed with #5717 ?

@lazyfrosch
Copy link
Contributor

I guess so... fixed by #5717

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/itl Template Library CheckCommands bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants