Page 1 of 1
How to blacklist some ESXi health checks using regexp
Posted: Thu Oct 18, 2018 8:14 am
by sac1472
Hello, I'm using check_esx.pl plugin & want to skip some health checks from monitoring using regexp like --- "*UNKNOWN*"
i'm able to skip check but without regexp by using -x "mention full name here". It's working. but i want to skip all checks starting with output "UNKNOWN" and it's not working.
My question is how to use below option --- (It's from help page of check_esx3.pl plugin)
o blackregexpflag - whether to treat blacklist as regexp
b - blacklist status objects
To skip one unknown sensor data - working command is like below ---
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -x "UNKNOWN[processor] Status of Other --- 0.3.1.183"
I want something like below to skip all unknown sensors health data from vmware-----
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -o blackregexpflag -x "UNKNOWN*"
Re: How to blacklist some ESXi health checks using regexp
Posted: Thu Oct 18, 2018 3:43 pm
by cdienger
Try the following:
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -o blackregexpflag -x "UNKNOWN.*"
Note the . after UNKNOWN. This combined with the * afterwards means any number of any character.
Re: How to blacklist some ESXi health checks using regexp
Posted: Fri Oct 19, 2018 6:26 am
by sac1472
But that's not working for me. i'm still getting below alerts & i want to skip all of those ---
1) UNKNOWN[memory] Status of Other --- 0.7.1.135: Cannot report on the current health state of the element
2) UNKNOWN[watchdog] Status of Other --- 0.35.0.212: Cannot report on the current health state of the element
3) UNKNOWN[watchdog] Status of Other --- 0.35.0.211: Cannot report on the current health state of the element
4) UNKNOWN[other] Status of Other --- 0.49.0.161: Cannot report on the current health state of the element
5) UNKNOWN[processor] Status of Other --- 0.3.1.183: Cannot report on the current health state of the element
6) UNKNOWN[processor] Status of Other --- 0.3.1.182: Cannot report on the current health state of the element
7) UNKNOWN[processor] Status of Other --- 0.3.1.181: Cannot report on the current health state of the element
8) UNKNOWN[processor] Status of Other --- 0.3.1.180: Cannot report on the current health state of the element
9) UNKNOWN[processor] Status of Other --- 0.3.1.179: Cannot report on the current health state of the element
10) UNKNOWN[processor] Status of Other --- 0.3.1.178: Cannot report on the current health state of the element
11) UNKNOWN[processor] Status of Other --- 0.3.1.177: Cannot report on the current health state of the element
12) UNKNOWN[processor] Status of Other --- 0.3.0.176: Cannot report on the current health state of the element
Also, i have tried like below to skip one alert by replacing last character with * that's also not working. Basically, regexp is not working with health checks----
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -o blackregexpflag -x "UNKNOWN[memory] Status of Other --- 0.7.1.13*"
Re: How to blacklist some ESXi health checks using regexp
Posted: Fri Oct 19, 2018 9:39 am
by cdienger
I should have removed the quotes in the previous post. Try:
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -o blackregexpflag -x UNKNOWN.*
Re: How to blacklist some ESXi health checks using regexp
Posted: Mon Oct 22, 2018 3:29 am
by sac1472
No that's not working.
@lmiltchev - could you please have a look on this thread ???
Thanks in advance.
Re: How to blacklist some ESXi health checks using regexp
Posted: Mon Oct 22, 2018 3:23 pm
by cdienger
The blackregexpoption doesn't seem to be working as expected. This seems to work a bit better:
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -o blacklistregexpflag -x UNKNOWN.*
Re: How to blacklist some ESXi health checks using regexp
Posted: Tue Oct 23, 2018 2:48 am
by sac1472
Nope, that's not working.

Re: How to blacklist some ESXi health checks using regexp
Posted: Tue Oct 23, 2018 2:12 pm
by lmiltchev
...Basically, regexp is not working with health checks----
This is what we found out too, while testing the plugin...
Running something like this would work:
Code: Select all
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -x "item1,item2,item3"
but running something like this won't work:
Code: Select all
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -x "item*" -o blacklistregexpflag
or
Code: Select all
./check_esx3.pl -H xxxxxx.corp -f /tmp/pass -l runtime -s health -o blacklistregexpflag -x "item*"
I would recommend that you contact the plugin's owner in order to get to the bottom of the issue.