Windows 2008 check_snmp_win.pl error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
maluther
Posts: 3
Joined: Thu Aug 22, 2013 1:43 pm

Windows 2008 check_snmp_win.pl error

Post 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-
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Windows 2008 check_snmp_win.pl error

Post 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)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
maluther
Posts: 3
Joined: Thu Aug 22, 2013 1:43 pm

Re: Windows 2008 check_snmp_win.pl error

Post 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-
maluther
Posts: 3
Joined: Thu Aug 22, 2013 1:43 pm

Re: Windows 2008 check_snmp_win.pl error

Post 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-
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Windows 2008 check_snmp_win.pl error

Post by sreinhardt »

Thanks for letting us know its working!!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked