How to blacklist some ESXi health checks using regexp

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sac1472
Posts: 66
Joined: Thu May 25, 2017 5:06 am

How to blacklist some ESXi health checks using regexp

Post 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*"
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to blacklist some ESXi health checks using regexp

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sac1472
Posts: 66
Joined: Thu May 25, 2017 5:06 am

Re: How to blacklist some ESXi health checks using regexp

Post 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*"
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to blacklist some ESXi health checks using regexp

Post 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.*
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sac1472
Posts: 66
Joined: Thu May 25, 2017 5:06 am

Re: How to blacklist some ESXi health checks using regexp

Post by sac1472 »

No that's not working.

@lmiltchev - could you please have a look on this thread ???

Thanks in advance.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to blacklist some ESXi health checks using regexp

Post 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.*
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sac1472
Posts: 66
Joined: Thu May 25, 2017 5:06 am

Re: How to blacklist some ESXi health checks using regexp

Post by sac1472 »

Nope, that's not working. :cry:
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to blacklist some ESXi health checks using regexp

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked