Monitor a Windows Server using SNMP

58,734

Solution 1

Use snmpwalk to see what the machine is reporting, and pick what looks appropriate :-)

For CPU utilization, the Host Resources MIB provides a SNMP Table at 1.3.6.1.2.1.25.3.3 which lists each CPU and it's current percent utilization, but these values can be somewhat misleading (100% doesn't always mean your system is overloaded).

www.oidview.com is a good place to go MIB-browsing, and will give you the MIB entity name as well as the OID.

Solution 2

You might consider using getif.exe or a mib browser to see what the machine is exposing.

The oid for generic processor info from one of the RFC mibs is:

.1.3.6.1.2.1.25.3.3.1

but you'll need to drill in to determine multiprocessor. On one of my single processor servers the oid is:

.1.3.6.1.2.1.25.3.3.1.2.1

YMMV.

An excellent source of snmp info is:

http://www.wtcs.org/snmp4tpc/testing.htm

As mentioned elsewhere, once you get the data, MRTG, Cacti, Nagios (et al) are great ways to show historical information, and to get a picture of the server health of your network.

Rob

Solution 3

You can use Cacti, on Linux or Windows, to manage snmp data & graph. It will discover oid by itself (using preloaded templates) and generate graphes for you (daily / monthly...) It's open source

Solution 4

There isn't any OID for 'performance usage', you will need to do your own investigation and determine what you want to capture - a lot of stuff from the HOSTS MIB (CPU, RAM, disk space) are common, but you may also care about specific things that are hardware-specific (vendor-specific RAID card for example.)

What tool are you using? Nagios, OpenNMS, and MRTG have templates for common scenarios.

Also, keep in mind that if you're using SNMP v2, your community strings are cleartext.

Share:
58,734
Mike McClelland
Author by

Mike McClelland

Updated on September 17, 2022

Comments

  • Mike McClelland
    Mike McClelland over 1 year

    How hard can this be? I want to get the current CPU performance from a remote Win 2k3 machine. I need to use SNMP because the machine is behind a firewall.

    Assumptions:

    • I understand networking/can configure any kind of IP address/port forwarding/firewall/stuff.
    • I understand SNMP - I know how to use my tool to get a value from an OID on a target machine.
    • I know what I want to do with the result from my SNMP request.
    • I have enabled SNMP on the Windows Server, configured the relevant IP security/community stuff.
    • I can already ask the Windows server standard stuff using SNMP about how many disks/network interfaces it has etc.

    Question: - What OID do I used to simply ask current performance usage.

    I have spent many hours asking Google - clearly asking the wrong question :S .... How hard can this be?

  • Mike McClelland
    Mike McClelland about 14 years
    Hi there. Thanks for your answer. This specifically for a custom built tool, but we do use Nagios as well. Mike
  • Mike McClelland
    Mike McClelland about 14 years
    Hi there. I've done plenty of MIB walking, I'm just surprised there isn't a simple (and standard) summary of CPU utilisation output. Sure, I can query for processors, then walk to get the processor usage for each proc, then add up/average/whatever to get a result that looks nice on the screen - but surely you'd have thought there'd just be one 'CPU utlisation summary' entry... I guess not... Thanks for your answer! Mike