Monitoring windows systems with munin and snmp

Posted by chris on Thu 30 Mar 2006 at 09:30

Tags: ,

Previously we learned how to use munin to monitor Debian machines. Now - we need to add some Windows boxes to the mix.

First - so that the discussion makes sense - here are the machines I have involved

  • galatea.chrissearle.org - debian sarge - runs both munin (server) and munin-node (client)
  • dauntless.chrissearle.org - debian sarge - runs munin-node (client)
  • czar.home.chrissearle.org - debian sid - runs munin-node (client)
  • shah.home.chrissearle.org - XP Pro - does not run munin
  • goldeneagle.home.chrissearle.org - XP Pro - does not run munin
  • dolphin.home.chrissearle.org - OSX - not yet running munin
  • bonnet.home.chrissearle.org - OpenBSD - not yet running munin
  • nornour.home.chrissearle.org - OpenBSD laptop - not yet running munin.

Galatea is the munin server - and the one that displays the relevant graphs etc.

Dauntless and Czar were already in place - see the previous article.

The aim of today was to see what could be added for Shah and Golden Eagle.

First we need to install snmp on these boxes. I did this a long time back for mrtg - but - more info is available on the munin website:

http://munin.projects.linpro.no/wiki/faq#QHowtomonitorWindowsXPboxesviaSNMPplugins

In brief (copied from munin's site at the above URL):

  • Install SNMP service: Start, Control Panel, Add or Remove Programs, Add/Remove Windows Components, Management and Monitoring Tools, Details, Simple Network Management Protocol, OK, Next, insert CD or supply a directory with WinXP installation files.
  • Configure SNMP service: Start, Control Panel, Administrative Tools, Services, look for SNMP Service in the list, Properties, Security, Send authentication trap, Accept SNMP packets from any host (or specify vesta host here), Apply.

Now we need to install the correct client node plugins. This needs to run on a munin-node box - either your main server - or another client. For my network the best place to run them is czar.home.chrissearle.org.

So - on that machine run the following:

munin-node-configure-snmp shah.home.chrissearle.org
munin-node-configure-snmp goldeneagle.home.chrissearle.org

Note - this is different to the FAQ where it states to leave the domain off. In my setup - probably because I run on a client rather than the server the domain needed to be present.

This will output a list of possible services:

czar:/var/log/munin# munin-node-configure-snmp goldeneagle.home.chrissearle.org
ln -s /usr/share/munin/plugins/snmp__df /etc/munin/plugins/snmp_goldeneagle.home.chrissearle.org_df
ln -s /usr/share/munin/plugins/snmp__if_err_ /etc/munin/plugins/snmp_goldeneagle.home.chrissearle.org_if_err_2
ln -s /usr/share/munin/plugins/snmp__if_ /etc/munin/plugins/snmp_goldeneagle.home.chrissearle.org_if_2
ln -s /usr/share/munin/plugins/snmp__processes /etc/munin/plugins/snmp_goldeneagle.home.chrissearle.org_processes
ln -s /usr/share/munin/plugins/snmp__users /etc/munin/plugins/snmp_goldeneagle.home.chrissearle.org_users

Restart munin-node after adding these lines.

Finally - we need to add the config to the munin server

In /etc/munin/munin.conf add the servers with the IP address of the server that has the plugins installed. For example:

[galatea.chrissearle.org]
       address 217.8.135.183

[dauntless.chrissearle.org]
       address 217.8.135.165

[czar.home.chrissearle.org]
       address 192.168.1.5

[shah.home.chrissearle.org]
       address 192.168.1.5

[goldeneagle.home.chrissearle.org]
       address 192.168.1.5

You should now see info on these servers in the munin graphs (at least once cron has run)

I see no reason why this could not monitor other snmp devices - but the only one I have (an el-cheapo wifi access point) doesn't actually broadcast any useful info - just its name (I guess just so they could stick snmp on the box)

Oh - bonus points if anyone can tell me my server naming scheme without going hunting on the net ;)

Share/Save/Bookmark


Posted by azathoth (81.217.xx.xx) on Thu 30 Mar 2006 at 11:14
[ Send Message ]
"Oh - bonus points if anyone can tell me my server naming scheme without going hunting on the net ;)"

Dauntless reminds me of a ship in Freespace 2 I think ;)
Thanks for this article I can definitely use this in one of the networks I administrer!

[ Parent | Reply to this comment ]

Posted by Lukhas (82.67.xx.xx) on Thu 30 Mar 2006 at 11:58
[ Send Message ]
The names sound like ship names (dunno if it's space or regular ships)

[ Parent | Reply to this comment ]

Posted by Steve (212.20.xx.xx) on Thu 30 Mar 2006 at 13:13
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Regular boats, kinda.

I admit I was confused since the Dauntless is one of the ships in Pirates of the Caribbean: Curse of the Black Pearl, and the USS Dauntless was also a Starfleet ship.

</geek>

Steve

[ Parent | Reply to this comment ]

Posted by chris (217.8.xx.xx) on Thu 30 Mar 2006 at 13:51
[ Send Message ]
OK - you found it - but - did you know it or did you have to search ? :)

[ Parent | Reply to this comment ]

Posted by Steve (212.20.xx.xx) on Thu 30 Mar 2006 at 13:52
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I searched, after seeing the comment about ships and then thinking about the Dauntless name.

So no point for me then? :(

Steve

[ Parent | Reply to this comment ]

Posted by chris (217.8.xx.xx) on Thu 30 Mar 2006 at 14:13
[ Send Message ]

Nope - no points there.

By the way - that list that that link links to lists dauntless as not racing (boy what a sentance). I'm pretty sure it is: Dauntless and Golden Eagle

[ Parent | Reply to this comment ]

Posted by tinus (80.126.xx.xx) on Thu 30 Mar 2006 at 13:48
[ Send Message ]
I was struggling with this yesterday and the article got me a bit further. but..
I don't get any html made.
munin-update.log says:
Got unknown reply from client "ztnc.com" -> "name" skipping

I named the client newrainbow.ztnc.com (XP machine) other clients (debian) declared the same way work fine.

anyone know where I went wrong?

[ Parent | Reply to this comment ]

Posted by chris (217.8.xx.xx) on Thu 30 Mar 2006 at 13:56
[ Send Message ]

Not sure from the problem description

Things to try

  1. On the linux box which is collecting the snmp data for your xp box - can you snmpwalk the xp box?
  2. On the server - telnet to the munin-node port on the linux box from step 1 (could well be the same host) on the munin port (default 4949). I see the following (Note the lines "list" and "nodes" I type into telnet).
    $ telnet czar.home.chrissearle.org 4949
    Trying 192.168.1.5...
    Connected to czar.home.chrissearle.org.
    Escape character is '^]'.
    # munin node at czar.home.chrissearle.org
    list
    open_inodes mysql_slowqueries irqstats if_eth0 apache_accesses ntp_states mysql_threads df swap load smart_hda cpu df_inode snmp_goldeneagle.home.chrissearle.org_df ntp_ntp2_scx_ru cupsys_pages mysql_queries open_files forks iostat memory vmstat apache_processes if_err_eth0 entropy processes apache_volume interrupts netstat snmp_goldeneagle.home.chrissearle.org_if_2 mysql_bytes snmp_goldeneagle.home.chrissearle.org_if_err_2 smart_hdb nfsd hddtemp_smartctl
    nodes
    czar.home.chrissearle.org
    goldeneagle.home.chrissearle.org
    shah.home.chrissearle.org
    .
    Connection closed by foreign host.

Do you see all the nodes you expect? And all the services you expect?

[ Parent | Reply to this comment ]

Posted by tinus (80.126.xx.xx) on Thu 30 Mar 2006 at 14:05
[ Send Message ]
1. yes.
2. yes. after I added the ip-adress of the munin-server to munin-node.conf
it only had 127.0.0.1 which apparently is not enough.

works! great. thanks a lot.

new question:

munin-node-configure-snmp "client-node"
only gets me
-disk usage
-network interface stats
-Number of Processes
-Number of Users

can I just add plugins to see if they will work?
(mem, load etc.)

[ Parent | Reply to this comment ]

Posted by chris (217.8.xx.xx) on Thu 30 Mar 2006 at 14:08
[ Send Message ]
munin-node-configure-snmp as far as I can see is doing something simmilar to

munin-node-configure --suggest --shell

for snmp plugins.

You can add others to try - but - I think they would be suggested if they were going to work,

You can always check the available OIDs for the XP box in the snmpwalk and then look in the plugins to see if they match.

[ Parent | Reply to this comment ]

Posted by sebastian (212.238.xx.xx) on Thu 30 Mar 2006 at 14:14
[ Send Message | View sebastian's Scratchpad | View Weblogs ]
Hi there!

I tried your howto to monitor my Windows system. All steps are oke. But munin doesn't show any stats on the website. When i issue the command to find snmp plugins is gives me the right values back as in your example.

Am i missing something?

Cheers, Sebastian

[ Parent | Reply to this comment ]

Posted by chris (217.8.xx.xx) on Thu 30 Mar 2006 at 14:24
[ Send Message ]
This is normally to do with the host names not matching or the addresses not matching.

Check comment 7 - do you see all the right hostnames and plugin names when running the telnet?

If you run the plugin manually on the host - does it give you the correct answer from snmp?

[ Parent | Reply to this comment ]

Posted by Anonymous (211.14.xx.xx) on Mon 8 May 2006 at 10:20
I run the configure command successful and have the snmp symlinks in the plugin dir. I also get data back, if I run the command by ahnd, but on run of the munin-cron I get this entry:

May 08 18:15:03 [1638] - Processing node: jupiter.tokyo.tequila.jp
May 08 18:15:03 [1638] - Processed node: jupiter.tokyo.tequila.jp (0.02 sec)
May 08 18:15:03 [1649] - Could not connect to jupiter.tokyo.tequila.jp(192.168.12.2): Connection refused - Attempting to use old configuration
May 08 18:15:04 [1638] - connection from tokyo.tequila.jp -> jupiter.tokyo.tequila.jp (1649)
May 08 18:15:04 [1638] - connection from tokyo.tequila.jp -> jupiter.tokyo.tequila.jp (1649) closed

And there is nothing created. no rrd data, no html.

If I connect to the box, I cannot see any snmp in the list, but I can see the nodes for the local box (linux) and the windows box.

what do I have to do, to get the snmp listet in the list command? I already restart munin node several times, checked that the ips match to the domain names, etc ...

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search