How to monitor Windows CPU and fan temperature by SNMP or other ways - windows

I want to monitor 3 kinds of data for windows machines:
cpu temperature,
fan temperature
and fan speed, retrieving these data every 5 minutes. If these data can be retrieved by SNMP, that's my first choice.
I am wondering whether these data's root data source comes from Microsoft or the vendor of the motherboard. If they come from Microsoft, their OID should starts with 1.3.6.1.4.1.311, if they come from motherboard vendor, their OID should starts with 1.3.6.1.4.1.[motherboard vendor private snmp vendor OID], for example 1.3.6.1.4.1.11 for a HP server machine, 11 represents HP's private snmp vendor OID.

If you simply want to know how to query a Windows machine for the relevant SNMP data, this is possibly not the right site to ask this question on as it is a site for Q&A specific to software development. You may have better success asking at Server-Fault - here is a similar question to yours on there.
The OIDs for hardware specific SNMP monitoring are usually vendor specific. Typically you would need the Management Information Base (MIB) files that apply to your specific hardware in order to extract the information about which OIDs pertain to the data you require - as far as I know, CPU and Fan temperature are not generic SNMP properties.
If you cannot find the MIBs for your hardware sets (or there is no SNMP agent for your specific hardware), there is a piece of Windows software called SpeedFan that has an SNMP plugin that allows you to monitor the CPU and fan temperatures via SNMP. However this would require the Speedfan software to run in the background on all machines you wish to monitor. The OIDs for the SpeedFan software SNMP plugin are:
Temperature: .1.3.6.1.4.1.30503.1.5.x
Fans: .1.3.6.1.4.1.30503.1.6.x
Voltages: .1.3.6.1.4.1.30503.1.7.x
To get started monitoring this SNMP data on a Windows client machine you typically would need to:
install SNMP agent service
configure the SNMP service
Install speedfan
Install the Speedfan SNMP plugin
determine which OIDs are pertinent to your hardware (either using SpeedFan or vendor specific MIBs)
use an SNMP tool to perform an SNMP walk or an SNMP get to fetch the relevant SNMP data.
Using the command-line tool netsnmp you can walk the SNMP tree like so:
snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.30503.1.5
(Assuming that your community string is "public" and you want to walk the "SpeedFan termperatures" sub-tree of your machine in this example).
A handy client tool with a gui for viewing snmp data is mibbrowser
The linked to Server-Fault Q&A has other useful information and links to various SNMP monitoring software solutions such as nagios, opennms etc.

Related

Reading, interpreting and exporting SNMP messages

I'm trying to wrap my head around how to use SNMP in my networks. It's for industrial applications, networks with 200-800 IPs, but many quirks and security layers.
What I'd like to do is catch any traps, and periodically read parameters, over SNMP for all my network equipment. It will be sent to an external system for storage and viewing.
I understand now that even though my equipment uses the SNMP standards, the same OIDs can sometimes mean different things, and I then have to get all the MIB files from the vendors.
I find many parsers that can give me information from within the MIBs, but what I need is a whole system for importing MIBs, adding them to some kind of library, and for me to know which devices are currently supported by my library. Then, when I receive a message, I need the system to figure out what equipment has sent that, look up the correct info from the MIB and construct an alarm message based on that.
Is there any solution today that can take a list of IPs and send SNMP-get messages to all of those?
Do I need any setup just to receive SNMP traps, or will they just be
attempted delivered at the specified IP address, and I need only to
listen at the correct port?
Is there any way to parse all those MIBs and turn them into a manageable library?
How do I associate the devices with the info from the MIBs, so I interpret the information correctly?
I want to make a general solution for this, so I can expand it to more devices and vendors easily later. Below is a sketch of how a typical network would look like, but of course with a lot more components in real life. Hope someone has some good input.

How to use Python to communicate with NIC PCIe

I am testing a custom FPGA NIC and I need to send management information (such as header info for matching) and traffic data to it using a traffic generator from within the user space.
The driver built for the FPGA is a modified version of IXGBE with DMA support for management, and also supports DPDK for kernel bypass to achieve high throughput.
I am trying to understand how the various software (driver, userspace application, etc) should be stacked/connected to each-other so I can achieve the objective of reading and writing to PCIe on the NIC using set of scripts from user space?
I have also been looking at this project
https://github.com/CospanDesign/python-pci
which is useful however based on Xilinx XDMA.
Would appreciate any help, pointers on this.
Sorry, the question is too broad. For such a broad question there is a generic answer: have a look at Inter Process Communication:
https://en.wikipedia.org/wiki/Inter-process_communication
There are variety of methods, like Unix sockets, shared memory, netlink etc, to communicate between user space processes. As well as a variety of methods to communicate between user space and kernel space.
Just pick the best for you and try to do something. If it fails, come again on SO and ask ;)

OIDs expected by NMS to draw the topology

I am writing a SNMP Agent for an Ethernet switch.
The agent is able to run and reply to provide SysDescr. It has been written in a modular design, such that, one can add OIDs very easily.
Now, my intention is to create a topology (say ring) of the switches and discover the topology using a common Network Management System like HP-NNMi or OpenNMS (I am testing on OpenNMS btw).
I just want to know, what oids are queried by an NMS, to gather enough information to draw the topology?
[EDIT] I can know, what is the MAC of the remote switches connected to any port of a switch, through MAC learning.
The answer depends on what type of topology you want to capture through your ethernet switch. Usually for a layer two switch (which appears to be the case) LLDP MIB (This is an IEEE std implemented by many switches) is quite useful. From what you described above that is you have information about MACs on a port it appears you probably can go this route. There are some other Physical topology MIBs (like RFC2292) that you may want to look at.
You can have a look at the OpenNMS Enhanced Linkd documentation. It will give you some hints which OID's are used to build a Layer-2 topology based on LLDP, CDP and the Bridge MIB. To build it a topology based on the Bridge MIB, OpenNMS has implemented the algorithm described in Topology Discovery for Large Ethernet Networks. You'll find also hints what information is used to build an OSPF and IS-IS topology.
Every NMS uses their proprietary topology discovery.
Depending on what your switch supports, you'll want to consider at least
RFC1213-MIB ipAddrTable, ipRouteTable
IF-MIB ifTable
IP-FORWARD-MIB inetCidrRouteTable
BRIDGE-MIB dot1dTpFdbTable, dot1dStpPortTable
Q-BRIDGE-MIB dot1qTpFdbTable
LLDP-MIB lldpLocPortTable, lldpRemTable
OSPF-MIB
BGP4-MIB
and if you support VLANs, you'll want to describe those.
We have seen other MIBs queried by NMS applications.

how to use SNMP

I have some linux servers which will work as SNMP agents. I need to use Java and SNMP4J to monitor these servers (agents), and also the SNMP manager must be able to check upon these servers.
How to implement SNMP in the SNMP agent to respond to the queries from SNMP manager?
What is the usage of MIB file? If I hardcode the values in the MIB file, does it mean that I don't need to parse the MIB file?
String product = "1.2.3.1.2.3.6421"
String productmgr = "1.2.3.1.2.3.6421.4"
There are some SO questions that should help.
For #1 look at Getting started with SNMP4J
For #2 you can indeed hardcode OIDs; but that would only work for a trivial scenario, there are many questions regarding MIBs e.g. question about SNMP MIB file
In order to implement SNMP agent on client side, after installing snmp , just execute snmp commands to communicate with the manager.
The Management Information Base (MIB) is a virtual information storage area for network management information, which consists of collections of managed objects. Within the MIB there are collections of related objects, defined in MIB modules. MIB modules are written in the SNMP MIB module language, as defined in STD 58, RFC 2578, RFC 2579, and RFC 2580.
Of course you can hardcode some OIDs in SNMP MIB. But in most of the cases it will not be stable. Even if you hardcode the values in the MIB file, then again you need to reparse the same.

Setting up an Intel VPro with AMT infrastructure

I'm trying to set up a remote management system with VPro supported computers under the same network. I've done a good amount of research into this topic and now i'm trying choose the right path to suit my needs. The system needs to follow certain parameters.
Parameters:
Remote KVM control without User Consent
Power on, off, control bios of selected computers
Control a network of computer within a wired internet connection
Allow remote connection from outside the network to client PCs within the network (i.e at home)
Remote AMT Configuration with Admin Controls
I understand that VPro supports all of these actions, however it's the server system that handles them. I had looked into Intel SCS Lite, however i believe this is just a configuration tool and database for the profiles and i cannot actually control client actions. Tools like Microsoft SCCM look promising, however would it fulfill all my needs? Are their cheaper alternatives? There is also Intel VPro platform solutions manager. For this option, do i create a database of the AMT PC's with intel SCS console than connect to that through the platform solutions manager so i can operate on my client PCs? Any information regarding the setup and configuration of remote management of a compute network supporting VPro would be helpful.
Edit: This was a great site i found for anyone else who is researching VPro
http://windowsmasher.wordpress.com/2013/10/05/intel-vpro-the-basics-of-vpro/
I still welcome any additional information.
Blindly assuming that you're not bound to windows solutions and regarding your parameters, I think...
Remote KVM control without User Consent
Allow remote connection from outside the network to client PCs within the network (i.e at home)
You don't really need no enterprise tool integration for this... do you?
Just set up a html page that contains links like vnc://your-client-xxx and let
realvnc plus
handle the rest? For the KVM/VNC-Sessions, you don't need a middleman SCCM/whatever.
VNC will connect to your AMT-enabled client directly, using TCP port 16992 (or 16993 when
using TLS which you surely want...?).
Allowing remote connection from outside has nothing to do with SCCM or vPro... You'll most likely have a VPN connection to your 'work network'? The vPro-enabled clients will (by default) share the DHCP-obtained IP with the client, so you should be able to protect vPro access by a ('real') firewall as desired.
Power on, off, control bios of selected computers
Control a network of computer within a wired internet connection
Again, no need for a paid tool. For the requirement "power on/off",
you might consider amttool, at least
for pre-AMT-9.0-systems (as 9.0 dropped the older vPro SOAP protocol EOI in favour of DASH). DASH was supported since vPro 6.0 IIRC, so you could also use
AMD's free dashcli.
Shell tools are great for scripting (read: scheduled power management / cron) but
you surely were looking for a nice GUI tool. You may want to look at amtc / amtc-web, its demo site or github-wiki. It should be easy
to add vnc:// links to that currently power-management-focussed (fast!) webapp.
Ahh, and I never used it myself, but there's also vTul, a PowerShell based GUI...
If it's all about really rarely power-cycling a single machine: Don't forget that vPro comes with a web-interface, which also allows to do this...
Remote AMT Configuration with Admin Controls
As stated by ChileAddict, SCS Lite should be fine. AFAIK it will also take care
of certificate renewals for TLS-enabled clients. And you can use it to push/update
AMT configuration.
Any information regarding the setup and configuration of remote management of a compute network supporting VPro would be helpful.
Check with your PC supplier. They can deliver your hosts with RCFG (Remote Configuration) enabled. The new clients will then send HELLO packets to your provisioner.example.com,
where example.com is taken from the DHCP reply received. The provisioner must have
a certificate installed that is accepted by AMT, see intel's page.
An alternative is to deploy configuration using USB sticks -- or by hand. Where by hand will not allow TLS-secured communications...
You have definitely done your homework and that windowsmasher site sums things up nicely. Unfortunately, the free tools, like the AMT Commander, the Platform Solution Manager, the Web UI that is part of AMT, etc are not enterprise level solutions and do not have databases to hold the information for each system in your environment. (I think the AMT Commander uses your registry to store system information and you can connect to many systems and not have to input them every time you start it. However you can't do an operation on multiple systems, for example "shut all my systems down and apply some patch".) It's a one system at a time deal.
You can provision multiple systems using the Intel SCS and when I was last using it, there was a database involved. I do not know much about SCCM. There are other Enterprise-level tools such as Landesk that offer management of many systems simultaneously (not free, of course.)
If you wanted to be able to manage multiple systems at a time without purchasing the software, you would have to write your own management console using the AMT SDK. (Sorry!)
You might want to look at Meshcentral.com (same developer who wrote the AMT Commander/Open Manageability Toolkit) he is always adding new features and you can also download the source code.
I hope this helps.

Resources