Skip to main content

Hello,

I have a ramdom problem with centreon_linux_snmp.pl plugin, sometimes it works but sometimes not.

perl ./centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=10.175.15.xx --snmp-version='3' --snmp-username=centreon   --authpassphrase=xxx --authprotocol=MD5 --privpassphrase=xxx --privprotocol=DES --warning='' --critical='' --process-path=/Appli/centreon/bin/centcore
OK: Number of current processes running: 0 | 'nbproc'=0;;;0;

 

perl ./centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=10.175.15.xx --snmp-version='3' --snmp-username=centreon   --authpassphrase=xxx  --authprotocol=MD5 --privpassphrase=xxx --privprotocol=DES --warning='' --critical='' --process-path=/Appli/centreon/bin/centcore
UNKNOWN: SNMP GET Request : Timeout

 

Why the SNMP request is ramdomly in error? I checked the snmp log but no messages

 

And the most surprising is the check is always OK without the --process-path parameter:

 

perl ./centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=10.175.15.xx --snmp-version='3' --snmp-username=centreon   --authpassphrase=xxx --authprotocol=MD5 --privpassphrase=xxx --privprotocol=DES --warning='' --critical=''
OK: Number of current processes running: 174 | 'nbproc'=174;;;0;
 

 

RESOLVE adding the option --snmp-autoreduce

./centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=10.175.15.xx --snmp-version='3' --snmp-username=xxx   --authpassphrase=xxx --authprotocol=MD5 --privpassphrase=xxx --privprotocol=DES --warning='' --critical='1:1' --process-name=centcore --snmp-autoreduce
OK: Number of current processes running: 1 | 'nbproc'=1;;1:1;0; (modifié) 


@Matt Could you please elaborate that what exactly will do  --snmp-autoreduce. 


Hello @pravink ,

snmp-autoreduce is a “meta” options that adjust other network setting of the plugins (timeout, number of OIDs asked, and other parameters):

  --snmp-autoreduce
Auto reduce SNMP request size in case of SNMP errors (By
default, the divisor is 2).

Basically the snmp-autoreduce will reduce the size of the bulk SNMP requested by the plugin is more little bulk. Sometime the network or the agent SNMP is quite not optimize (or sometime snmp is not the priority for a router or switch ^^).


Reply