Windows SNMP client

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Windows SNMP client

Post by MPIvan »

Hi all,

im trying to monitor my PC without NSClient++, instead i have enable and configure the SNMP service that windows have and uses as client. Control panel > administrative tools > Services and here in SNMP service you can configure the community string and on what host should send the SNMP info .... and im trying the simple check_nt check to see is it work and it show me this errors
root@nagios:/usr/local/nagios/libexec# ./check_nt -H 172.25.1.101 -p 162 -s MyPC -v UPTIME
Connection refused
could not fetch information from server
root@nagios:/usr/local/nagios/libexec#

so is there a way to get this work or do i have to install some client ... i canot see way this wont work or do i missing something ? I dont want to install the client or some kind of agent on some PC and servers and they are all windows and we have some policy for installing ... etc ..... any solution ?
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Windows SNMP client

Post by gshergill »

Hi MPIvan,

As far as I know, check_nt requires NSClient to be installed.

SNMP monitoring should have it's own plugins which monitor required parts of a windows system (e.g. check_snmp).

Kind Regards,

Gary Shergill
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Windows SNMP client

Post by yancy »

MPIvan,

If you're looking to monitor windows without installing a client, I would recommend WMI over SNMP. Check_nt does require client software to be installed.

http://assets.nagios.com/downloads/nagi ... ng_WMI.pdf


Regards,

-Yancy
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Windows SNMP client

Post by MPIvan »

Tnx for reply ...

here is what iv got for now .... i was trying the check_snmp to see what will do, and it gave me the results ... as the solution of my question ... i guess it works ok but now i have problem loading or reading the mibs of my pc .... as you can see i have errors of missing mibs and i have to find the numbers or something instead of writhing the mibs name "sysUptime" i have to write the number and that is irritating .... any solution about this problem ??? how to download the mibs so i dont have to write the number i already do this for my Cisco Routers folowing this commands

Code: Select all

cd /usr/share/mibs/netsnmp
wget ftp://cisco.com/pub/mibs/v2/SNMPv2-MIB.my
wget ftp://cisco.com/pub/mibs/v1/RFC1213-MIB.my
wget ftp://cisco.com/pub/mibs/v2/IANAifType-MIB.my
wget ftp://cisco.com/pub/mibs/v2/SNMPv2-TC.my
wget ftp://cisco.com/pub/mibs/v2/SNMPv2-SMI.my
echo "mibs +sysUpTime" >> /etc/snmp/snmp.conf
but for windows i dont know how to do that and where to put them ...
root@nagios:/usr/local/nagios/libexec# ./check_snmp -H 172.25.1.101 -C MyPC -p 162 -m ALL
No OIDs specified
root@nagios:/usr/local/nagios/libexec# ./check_snmp -H 172.25.1.101 -C MyPC -p 162 -o 1.3.6.1.2.1.1.3.0
External command error: Timeout: No Response from 172.25.1.101:162.
root@nagios:/usr/local/nagios/libexec# ./check_snmp -H 172.25.1.101 -C MyPC -p 161 -o 1.3.6.1.2.1.1.3.0
SNMP OK - Timeticks: (35268401) 4 days, 1:58:04.01 |
root@nagios:/usr/local/nagios/libexec# ./check_snmp -H 172.25.1.101 -C MyPC -p 162 -m sysUptime
No OIDs specified
root@nagios:/usr/local/nagios/libexec# ./check_snmp -H 172.25.1.101 -C MyPC -p 162 -o sysUptime
External command error: Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/DIFFSERV-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/MPLS-TE-STD-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/GMPLS-TE-STD-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/DIFFSERV-CONFIG-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/MPLS-LSR-STD-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/DOCS-CABLE-DEVICE-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/ALARM-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/IP-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/DISMAN-EVENT-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/DISMAN-EXPRESSION-MIB)
Undefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2195 in /usr/share/mibs/ietf/IPSEC-SPD-MIB
Undefined OBJECT-GROUP (diffServMultiFieldClfrNextFree): At line 2157 in /usr/share/mibs/ietf/IPSEC-SPD-MIB
Undefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2062 in /usr/share/mibs/ietf/IPSEC-SPD-MIB
Unlinked OID in IPATM-IPMC-MIB: marsMIB ::= { mib-2 57 }
Undefined identifier: mib-2 near line 18 of /usr/share/mibs/ietf/IPATM-IPMC-MIB
Bad operator (INTEGER): At line 73 in /usr/share/mibs/ietf/SNMPv2-PDU
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/APPLICATION-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/GMPLS-LSR-STD-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/ietf/DISMAN-SCHEDULE-MIB)
Expected "::=" (RFC5644): At line 493 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Expected "{" (EOF): At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad object identifier: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad parse of OBJECT-IDENTITY: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Timeout: No Response from 172.25.1.101:162.
root@nagios:/usr/local/nagios/libexec#
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Windows SNMP client

Post by sreinhardt »

Most mibs for windows devices are stored in c:\windows\system32\. I am not sure if sysuptime is available as you are expecting via MS mibs. As yancy mentioned, WMI is significantly easier to use and more powerful than snmp for windows machines. Such limitations as not even seeing an oid tree for services that are not running is one of the issues to getting reliable data on windows machines via snmp.
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.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Windows SNMP client

Post by MPIvan »

with this command iv got the result ...

Code: Select all

./check_snmp -H 172.25.1.101 -C MyPC -p 161 -o 1.3.6.1.2.1.1.3.0
but i want instead of oid ( the number ) to set/call with the name example: "sysUptime" MIB. Now i will try with WMI to see what can i get from there ....

and for MIB's that are missing i dont know how to import them in the Linux machine or Nagios server how to download or get or something so i dont get this error is there some automatic download procedure or do i have to download them manual. If i have to do this manual how and where to put them in Linux or Nagios in what directory ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Windows SNMP client

Post by abrist »

Each distro may handle mibs differently. What linux distro and version are you running on your core server?
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.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Windows SNMP client

Post by MPIvan »

It is Ubuntu server 12.04.2 LTS. And nagios is Nagios Core Version 3.4.1
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Windows SNMP client

Post by sreinhardt »

Considering you are using check_snmp which uses net::snmp from perl I would look at this article: http://www.net-snmp.org/wiki/index.php/ ... ading_MIBS
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