Page 1 of 1

Windows 2008 check_snmp_win.pl error

Posted: Thu Aug 22, 2013 5:18 pm
by maluther
Hello. I'm having an issue using the check_snmp_win.pl error against several Windows 2008 servers. I have searched for this issue and tried suggestions in other threads.

Below are the details of the issue:

Nagios Version: 2012R2.2
64-bit Nagios VM created using the vSphere OVF Template.

Monitored servers:
Windows 2008 Standard SP2 32-bit
Windows 2008 R2 Standard SP1 64-bit

When I run the check_snmp_win.pl from Nagios XI command prompt to check for a Windows Service, I get the following:

Code: Select all

ERROR: Process name table : Message size exceeded buffer maxMsgSize.
I have tried changing the $session->max_msg_size(10000); value all the way up to 1000000 with no success. Below is the actual output:

Code: Select all

[root@localhost libexec]# pwd
/usr/local/nagios/libexec
[root@localhost libexec]# ./check_snmp_win.pl -H 192.168.1.100 -C public -2 -n 'SQLSERVERAGENT' -v
Alarm at 15
10000
ERROR: Process name table : Message size exceeded buffer maxMsgSize.
This does not happen on Windows 2003 Standard servers I am checking. Any assistance would be greatly appreciated. Thank you so much!

Regards,
-Mark-

Re: Windows 2008 check_snmp_win.pl error

Posted: Fri Aug 23, 2013 10:43 am
by abrist
You should be able to increase the maxmsgsize in the script:
Edit /usr/local/nagios/libexec/check_snmp_win.pl and find this line:

Code: Select all

$session->max_msg_size(5000)
Try increasing the limit - doubling it to 10000 is a good start. Save out and attempt the check again.

Code: Select all

$session->max_msg_size(10000)

Re: Windows 2008 check_snmp_win.pl error

Posted: Fri Aug 23, 2013 11:08 am
by maluther
Hello abrist,

Thank you for the reply. The original post was made after already increasing the value to 10000. The output at the bottom of the original post was using $session->max_msg_size(10000).

I've even tried changing the value all the way up to 1000000 with the same results. Below is the output using $session->max_msg_size(1000000);

Code: Select all

[root@localhost libexec]# ./check_snmp_win.pl -H 192.168.1.100 -C public -2 -n 'SQLSERVERAGENT' -v
Alarm at 15
1472
ERROR: Process name table : Message size exceeded buffer maxMsgSize.
[root@localhost libexec]# 
Are there any other thoughts? Again, thanks for the assistance.

Regards,
-Mark-

Re: Windows 2008 check_snmp_win.pl error

Posted: Fri Aug 23, 2013 11:20 am
by maluther
I just realized something which helped me resolve this. I tried all of the suggested values I've read on other threads (5500 and 10000). Then I tried a much much larger value of 1000000.

When I use the value of 1000000 the error reports 1472 instead of the actual value of 1000000. So that made me think that 1000000 is much too large of a number to use. So I slowly increased from 10000 to 15000 and made sure the error reported the actual value I've put there. Finally I found a value that works for me. I'm having to use $session->max_msg_size(15000);

I'm not sure what the limit/highest value I can use there is, but this is working for now.

If anyone else is having this issue, I'd suggest just using:

Code: Select all

$session->max_msg_size(15000);
If that doesn't work, increase it by 1000 until it works. When the alarm stops reporting the actual value you've entered, then you've probably gone too high. Hopefully this will help someone else.

-Mark-

Re: Windows 2008 check_snmp_win.pl error

Posted: Fri Aug 23, 2013 2:46 pm
by sreinhardt
Thanks for letting us know its working!!