Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Can anyone tell me the maximum size of a command in Nagios Core? I have this command but whatever I put at the end, Nagios will say it's missing, I've already tested it.
Could you provide some clarification? The command length shouldn't be the problem here. What were some combinations you tried and what were their corresponding outputs?
$USER1$/check_snmp -o $ARG1$ -P 3 -U $USER3$ -L authPriv -a SHA -A $USER4$ -x AES-128 -X $USER5$ -H $HOSTADDRESS$
with host name at the end and it return with "No Host defined" error. I didn't get it the first time and tried check_ifstatus that return with a missing module error.
I return the this check and alter it to
$USER1$/check_snmp -H $HOSTADDRESS$ -P 3 -U $USER3$ -L authPriv -a SHA -A $USER4$ -x AES-128 -X $USER5$ -o $ARG1$
with OID at the end and the error was "no OID defined". So i thought "it seems like there is a pattern here".
I tried the last variant (the origin of this post) and create the post to try find a solution or the reason for the problem.
The error at this time is "Required parameter: privpasswd"
Nagios Core doesn't limit command size. If you're using something to export to a database (e.g. NDO/NDOUtils for export to Nagios XI), you could hypothetically see truncation there, but that won't stop the command from running inside of Core.
The first thing I would check for here is whether all of your strings are terminated properly. if one of your macros has a ' or " with no matching quote, that will cause the check_snmp script to see all of the following text as "part of" the preceding argument.
Hopefully that helps - let us know if you can find anything.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy
More stange!
if i run the command on shell with the user that run nagios server, the command works great and respond what should to be.
The command has been giving the error always after the priv pass, the last char of priv pass is $. it need to be escaped at some how?
At the macros all have " with the matching at the other end.