Getting error on snmp checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Getting error on snmp checks

Post 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");
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Getting error on snmp checks

Post 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.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Getting error on snmp checks

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Getting error on snmp checks

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Getting error on snmp checks

Post 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"
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Getting error on snmp checks

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Getting error on snmp checks

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Getting error on snmp checks

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Getting error on snmp checks

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Getting error on snmp checks

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked