Page 1 of 1
Getting error on snmp checks
Posted: Thu Jan 18, 2018 9:31 am
by bosecorp
Hi,
I'm getting error when i run a snmp check on one of the linux server.
root@usvanagiospxi2:(01-18 08:57): /usr/local/nagios/libexec
# /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H usvajamastg -C nc-BOSE --v2c -m /var -w 90 -c 95 -f
ERROR: Description/Type table : The message size exceeded the buffer maxMsgSize of 1472.
We are facing this issue on only one linux server.
# cat /usr/local/nagios/libexec/check_snmp_storage_wizard.pl | grep -i max
max-size of the SNMP message, usefull in case of Too Long responses.
my $oct_test= $session->max_msg_size();
verb(" actual max octets:: $oct_test");
$oct_resultat = $session->max_msg_size($o_octetlength);
$oct_test= $session->max_msg_size();
verb(" new max octets:: $oct_test");
Re: Getting error on snmp checks
Posted: Thu Jan 18, 2018 4:36 pm
by npolovenko
@bosecorp, Looks like you can increase the allowed message size by adding this argument to the command:
Code: Select all
-o, --octetlength=INTEGER
max-size of the SNMP message, usefull in case of Too Long responses.
Be carefull with network filters. Range 484 - 65535, default are
usually 1472,1452,1460 or 1440.
You can try this, for example:
Code: Select all
/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H usvajamastg -C nc-BOSE --v2c -m /var -w 90 -c 95 -f -o 5000
Another solution would be to find the snmp_api.h config file on your system and increase the maxMsgSize there.
Let us know if that helps.
Re: Getting error on snmp checks
Posted: Wed Jan 24, 2018 2:43 pm
by bosecorp
Adding the argument worked for me. If we update the parameters in the command it will affect all the checks so i need to know how this will affect nagiosxi performance.
Also can you please assist on how to update the "snmp_api.h" config file
Re: Getting error on snmp checks
Posted: Wed Jan 24, 2018 3:41 pm
by npolovenko
@bosecorp, No, It shouldn't slow down Nagios performance. Increasing the allowed limit doesn't mean that all the other SNMP checks will start sending more information. Unless you have lots of SNMP checks that send five thousand bytes each it wouldn't affect the XI.
Also can you please assist on how to update the "snmp_api.h" config file
Yes. Here's the file path on my system:
Code: Select all
/usr/include/net-snmp/library/snmp_api.h
And here's the line that needs to be changed.
Code: Select all
#define SNMP_MAX_MSG_SIZE 1472 /* ethernet MTU minus IP/UDP header */
However, If you achieved the result without changing any global variables I'd rather leave everything as it is, and just use a -o 5000 argument.
Re: Getting error on snmp checks
Posted: Thu Jan 25, 2018 8:53 am
by bosecorp
When i changed the parameter on one of the service checked, other servers started to complain.
Error seen on other servers "octet lenght must be < 65535 and > 484"
Re: Getting error on snmp checks
Posted: Thu Jan 25, 2018 2:32 pm
by npolovenko
@bosecorp, Are you sure that you didn't put `-o 50000` by accident? Seems like there's a line in the plugin that verifies whether the -o argument is less than 65535 and bigger than 484. I don't see why'd it error out on 5000.
Code: Select all
if (defined ($o_octetlength) && (isnnum($o_octetlength) || $o_octetlength > 65535 || $o_octetlength < 484 )) {
print "octet lenght must be < 65535 and > 484\n";print_usage(); exit $ERRORS{"UNKNOWN"};
}
Are all the other snmp checks defined separately? Maybe it would make sense to use -o as an argument to only one service check instead of hardcoding it in the command since only one check was experiencing problems?
Re: Getting error on snmp checks
Posted: Wed Mar 21, 2018 3:38 am
by bosecorp
I'm still facing this issue..
Need help
# /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H usvaplotlyprod -C nc-BOSE --v2c -m "^/$" -w 90 -c 95 -f -o 5000
ERROR: Description/Type table : The message size exceeded the buffer maxMsgSize of 5000.
Re: Getting error on snmp checks
Posted: Wed Mar 21, 2018 2:50 pm
by npolovenko
@bosecorp, Can you try -o 2000?
Code: Select all
/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H usvaplotlyprod -C nc-BOSE --v2c -m "^/$" -w 90 -c 95 -f -o 2000
Re: Getting error on snmp checks
Posted: Thu Mar 29, 2018 8:16 am
by bosecorp
Can you please escalate this to next level, its been a while we are struggling with this issue.
# /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H usvaplotlyprod -C nc-BOSE --v2c -m "^/$" -w 90 -c 95 -f -o 2000
ERROR: Description/Type table : The message size exceeded the buffer maxMsgSize of 2000.
Re: Getting error on snmp checks
Posted: Thu Mar 29, 2018 11:26 am
by npolovenko
@bosecorp, Please open a new support ticket here:
https://support.nagios.com/tickets/
In the body of the ticket, you can reference a link to this thread instead of rewriting the whole problem.