Skip to main content
Solved

SNMP plugin centreon_linux_snmp.pl not works at each check

  • February 11, 2022
  • 3 replies
  • 1740 views

Forum|alt.badge.img+4

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;
 

 

Best answer by Matt

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é) 

3 replies

Forum|alt.badge.img+4
  • Author
  • Steward **
  • Answer
  • February 11, 2022

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é) 


Forum|alt.badge.img+2
  • Steward **
  • April 20, 2022

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


Forum|alt.badge.img+16
  • Steward **
  • April 22, 2022

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 ^^).