Getting error on snmp checks
Getting error on snmp checks
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");
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");
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Getting error on snmp checks
@bosecorp, Looks like you can increase the allowed message size by adding this argument to the command:
You can try this, for example:
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.
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.
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 5000Let us know if that helps.
Re: Getting error on snmp checks
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
Also can you please assist on how to update the "snmp_api.h" config file
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Getting error on snmp checks
@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.
And here's the line that needs to be changed.
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.
Yes. Here's the file path on my system:Also can you please assist on how to update the "snmp_api.h" config file
Code: Select all
/usr/include/net-snmp/library/snmp_api.hCode: Select all
#define SNMP_MAX_MSG_SIZE 1472 /* ethernet MTU minus IP/UDP header */As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Getting error on snmp checks
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"
Error seen on other servers "octet lenght must be < 65535 and > 484"
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Getting error on snmp checks
@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.
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?
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"};
} As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Getting error on snmp checks
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.
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.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Getting error on snmp checks
@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 2000As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Getting error on snmp checks
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.
# /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.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Getting error on snmp checks
@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.
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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.