Just setup a new WMI monitor and I am receiving A valid MODE and/or SUBMODE must be specified. I would like to know what are the supported special characters of a password for WMI? Also the command that XI is using is as follows:
$USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m $ARG3$ $ARG4$
The corresponding ARGs are
$ARG1$ 'domain/username'
$ARG2$ 'N
$ARG3$ password
$ARG4$
$ARG5$ checkcpu
$ARG6$ -w '50' -c '99'
I think there is an issue with the special character in my password or the matching of the ARGS.
WMI Error - A valid MODE and/or SUBMODE must be specified
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: WMI Error - A valid MODE and/or SUBMODE must be specifie
The following can become a problem
Additionally, others can be problematic with the command specified as it is, you may want to consider the following
Which wraps the password in single quotes.
Additional info
https://support.nagios.com/kb/article.php?id=580
Code: Select all
!`~$&|'"<>Code: Select all
$USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p '$ARG2$' -m $ARG3$ $ARG4$Additional info
https://support.nagios.com/kb/article.php?id=580
Re: WMI Error - A valid MODE and/or SUBMODE must be specifie
Still not working.
Re: WMI Error - A valid MODE and/or SUBMODE must be specifie
One thing worth mentioning is your $ARGn$ values don't seem to line up with the Nagios command definition.
You should instead be passing the password via $ARG2$ and the submode via $ARG3. $ARG4$ would then be additional parameters you pass to the specific submode, stuff like the warning/critical thresholds, path to a specific disk you want to check (if using checkdrivesize for the submode), etc.
With the check_wmi_plus plugin, -m denotes the submode. In the context of the Nagios command definition you've displayed above, you are passing "password" as the value of the submode via $ARG3$. Essentially, this is being run:taandrews wrote: $USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m $ARG3$ $ARG4$
The corresponding ARGs are
$ARG1$ 'domain/username'
$ARG2$ 'N
$ARG3$ password
$ARG4$
$ARG5$ checkcpu
$ARG6$ -w '50' -c '99'
Code: Select all
$USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u 'domain/username' -p 'N -m passwordFormer Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: WMI Error - A valid MODE and/or SUBMODE must be specifie
What mcapra said is correct, the arguments do not line up with the command.
Try changing them to this.
'
There is not a $ARG5$ and $ARG6$ so they are not needed.
Try changing them to this.
Code: Select all
$ARG1$ 'domain/username'
$ARG2$ password
$ARG3$ checkcpu
$ARG4$ -w '50' -c '99There is not a $ARG5$ and $ARG6$ so they are not needed.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: WMI Error - A valid MODE and/or SUBMODE must be specifie
Resolved. There was an unsupported special character in my password. I didn't realize the Nagios has stripped the special character and some other characters along with it.
Re: WMI Error - A valid MODE and/or SUBMODE must be specifie
Thanks for reporting back your results. I'll close and lock the post for you. If you have any new questions in the future, feel free to open a new post.
Be sure to check out our Knowledgebase for helpful articles and solutions!