diff --git a/centreon-plugins/src/check_centreon_snmp_cpu b/centreon-plugins/src/check_centreon_snmp_cpu index 40d07ff65..304ba36be 100644 --- a/centreon-plugins/src/check_centreon_snmp_cpu +++ b/centreon-plugins/src/check_centreon_snmp_cpu @@ -128,6 +128,7 @@ $name =~ s/\.pl.*//g; my ($session, $error); if ($snmp eq "1" || $snmp eq "2") { ($session, $error) = Net::SNMP->session(-hostname => $opt_H, -community => $opt_C, -version => $snmp); + $session->max_msg_size(50000); if (!defined($session)) { print("UNKNOWN: SNMP 1 or 2 Session : $error\n"); exit $ERRORS{'UNKNOWN'}; @@ -149,7 +150,6 @@ if ($snmp eq "1" || $snmp eq "2") { sub get_netsnmp_version ($){ my $sess = $_[0]; my $OID_VERSION = "1.3.6.1.2.1.25.6.3.1.2"; - $sess->max_msg_size(5000); my $result = $sess->get_table(Baseoid => $OID_VERSION); if (!defined($result)) { printf("ERROR when getting SNMP version : %s.\n", $session->error);