Hello,
I am in the process of implementing the check_wmi_plus plugin for agentless active checking, and I was wondering if anyone here could help me with a couple of things.
Having read through the documentation at https://github.com/speartail/checkwmipl ... README.txt, there are two things I'm unsure of how to do that I'd like to be able to:
1) Boolean "and" for the warning/critical criteria. They give an example of how to use an inclusive "or" in lines 231 to 241 of the README file, but I'm not sure if they have a way to do this.
2) Pass arguments to the actual WMI check getting executed. I was wondering if it's possible (probably not, but worth the ask) to pass arguments like -filter "DriveType=3" to the wmi commands being run by the check.
Just wondering if anyone's had experience with these. If these aren't possible without extensive modification, I might just make my own checks using WMIC.
Thank you very much.
check_wmi_plus options
Re: check_wmi_plus options
For #1, I think the only way to do boolean and would be to essentially make 2 service checks in 1. Basically by writing a little wrapper script that runs the check twice, once for each metric, and then sorts out the results for a single return to Nagios. That would be all good and well, except...
For #2 I don't think that plugin allows you to set a filter in the WMI query. It looks like it only has a filter for the output of the query.
So with that, you might have to make your own check. But hey, if you make a more robust WMI check, you could post it to the Nagios Exchange, and help out the next person who comes looking for such functionality.
For #2 I don't think that plugin allows you to set a filter in the WMI query. It looks like it only has a filter for the output of the query.
So with that, you might have to make your own check. But hey, if you make a more robust WMI check, you could post it to the Nagios Exchange, and help out the next person who comes looking for such functionality.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_wmi_plus options
You can define modules (custom queries) and pass args into them, yeah:
https://edcint.co.nz/checkwmiplus/ini-f ... mentation/
It's not super well documented, though. They're basically just templated WQL queries and should allow you to do all the above.
I wrote this thing a while back if Python is more accessible in terms of understanding WMI things:
https://github.com/mcapra/nagios-check_ ... eck_wmi.py
https://edcint.co.nz/checkwmiplus/ini-f ... mentation/
It's not super well documented, though. They're basically just templated WQL queries and should allow you to do all the above.
I wrote this thing a while back if Python is more accessible in terms of understanding WMI things:
https://github.com/mcapra/nagios-check_ ... eck_wmi.py
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 25
- Joined: Mon May 13, 2019 11:57 am
Re: check_wmi_plus options
I think I might do exactly that, even if @mcapra's suggestion works out. All for paying it forward (and I've asked enough questions on this forum that I think I owe it to the community at this point).mbellerue wrote:So with that, you might have to make your own check. But hey, if you make a more robust WMI check, you could post it to the Nagios Exchange, and help out the next person who comes looking for such functionality.
Thank you very much.