Skip to main content

Hi,

As the official Aruba stack check does not work with the Aruba switches we have, I tried to create a command using centreon_generic_snmp.pl. The command below works just fine on the command line:

/usr/lib/centreon/plugins//centreon_generic_snmp.pl  --plugin=apps::protocols::snmp::plugin --hostname=1.2.3.1 --snmp-version='3' --snmp-username=polling --authpassphrase=uaaa --authprotocol=SHA --privpassphrase=uaaa --privprotocol=AES  --verbose --mode=string-value --oid=1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.14.1  --map-values=''CCCAAABBB2'=>OK' --map-value-other='DOWN' --format-ok='Stack member is: %{details_ok}' --format-details-critical='Stack member status is %{value}' --critical-regexp='DOWN' --verbose

OK: Stack member is: OK

 

When I add it to web, I get this error:

argument alone at (eval 28) line 189.

 

Command itself in web is:

$CENTREONPLUGINS$/centreon_generic_snmp.pl  --plugin=apps::protocols::snmp::plugin --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-username=$_HOSTSNMPUSERNAME$ --authpassphrase=$_HOSTAUTHPASSPHRASE$ --authprotocol=$_HOSTAUTHPROTOCOL$ --privpassphrase=$_HOSTPRIVATEPASSPHRASE$ --privprotocol=$_HOSTPRIVPROTOCOL$ $_HOSTSNMPEXTRAOPTIONS$ --verbose --mode=string-value --oid=1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.14.1  --map-values=''$_HOSTMEMBER1SERIAL$'=>OK' --map-value-other='DOWN' --format-ok='Stack member is: %{details_ok}' --format-details-critical='Stack member status is %{value}' --critical-regexp='DOWN' $_SERVICEEXTRAOPTIONS$

 

Am I missing something from the comnfiguration? Some special character?

 --map-values=''CCCAAABBB2'=>OK' 

->

 --map-values=”’CCCAAABBB2'=>OK” maybe? or add it in the web with 

 

--debug


I tried and unfortunately same problem.

With --debug nothing changes in web and I still get the same error: argument alone at (eval 28) line 189.

 

If I use --map-values=”’CCCAAABBB2'=>OK” I get CRITICAL: value(s): Stack member status is DOWN although the serials match and should be ok (from Command line).

bash-5.1$ /usr/lib/centreon/plugins//centreon_generic_snmp.pl  --plugin=apps::protocols::snmp::plugin --hostname=1.2.3.1 --snmp-version='3' --snmp-username=oll --authpassphrase=abc --authprotocol=SHA --privpassphrase=abc --privprotocol=AES  --verbose --mode=string-value --oid=1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.14.1  --map-values="'HKX0H2'=>OK" --map-value-other='DOWN' --format-ok='Stack member is: %{details_ok}' --format-details-critical='Stack member status is %{value}' --critical-regexp='DOWN' --verbose --debug

CRITICAL: value(s): Stack member status is DOWN 

.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.14.1 = HKX0H2

 

And in web it still shows argument alone at (eval 28) line 189.


Any ideas how to solve this?


Has somebody tested this also? 

I changed the --map-values='HKX0H21=>OK'

and i still get it to work in commandline:

/usr/lib/centreon/plugins//centreon_generic_snmp.pl  --plugin=apps::protocols::snmp::plugin --hostname=1.2.2.1 --snmp-version='3' --snmp-username=smn-poll --authpassphrase=abc --authprotocol=SHA --privpassphrase=abc --privprotocol=AES  --verbose --mode=string-value --oid=1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.14.1  --map-values='HKX0H21=>OK' --map-value-other='DOWN' --format-ok='Stack member is: %{details_ok}' --format-details-critical='Stack member status is %{value}' --critical-regexp='DOWN' --verbose

OK: Stack member is: OK 

But in Web UI I get this error: argument alone at (eval 37) line 2214.

 

What am I still missing or what should I add to command for it to work in Web also?


I found the problem and was able fix this by adding ‘’, so this is no longer a problem/issue.


Reply