Setup the Windows 2000/2003 Server:
1. Make sure WMI is installed. Look under Administrative Tools->Services.
If it's not there, install.
For Windows 2003 Server: through Add/Remove Programs->Add/Remove Windows Componets->Management and Monitoring Tools. Select SNMP and "WMI Installer Provider" componets.
For Windows 2000 Server: I have no idea. Maybe someone can shed some light on this? On my test machine it was already installed.
2. Download and install Pegasus WMI Mapper version 2.3 (version 2.0 does not work). This service allows the linux machine to make wmi queries to the windows server. Download from http://h18023.www1.hp.com/support/files/server/us/download/26684.html
3. Modify the config file for Pegasus WMI Mapper. Go into the directory you installed Pegasus WMI Mapper in. By default, this is C:\Program Files\The Open Group\WMI Mapper\
Edit the file
Code: Select all
cimserver_planned.conf
Code: Select all
enableHttpsConnection=true
Code: Select all
enableHttpsConnection=false
Code: Select all
enableHttpConnection=false
Code: Select all
enableHttpConnection=true
More info on the Pegasus WMI Mapper is available from http://forums.cacti.net/viewtopic.php?t=11752&postdays=0&postorder=asc&start=15
4. Stop/start the Pegasus WMI Mapper service. (Administrative Tools->Services)
Now the linux configuration:
5. Download and compile sblim-wbemcli. This program allows the linux machine to make WMI queries to the windows machine. Download from http://sourceforge.net/project/showfiles.php?group_id=128809&package_id=141067
(I tested with version 1.5.3 and know it works). If you are on a debian machine, you may have trouble with wbemcli's configure program complaining about not being able to find a www library. This is because debian calls the w3c library libwww0 while the configure program tries to link against libwww. To get around this, I installed the gnome http library by typing "
Code: Select all
apt-get install libghttp-dev
6. Install wbemcli to your cacti scripts directory. On my machine, the command was "
Code: Select all
install -o root -g root -m 0755 wbemcli /usr/share/cacti/site/scripts/
7. Copy the script attached below, tsusers.sh to your cacti scripts directory. If your scripts directory is anything other than /usr/share/cacti/site/scripts, then you will need to edit tsusers.sh and change the CACTI_SCRIPT_DIR variable. Oh, make tsusers.sh executable: "
Code: Select all
chmod a+x /usr/share/cacti/site/scripts/tsusers.sh[code]"
8. Download and import the cacti template attached below.
9. Add the template to your host. You probably know how to add the graph, but if not...
Assuming you already have a windows host being graphed via snmp/whatever, then go into cacti, click Devices, then click your windows host. Under "Associated Graph Templates", click the drop-down "Add Graph Template", then select "Microsoft Terminal Services - Active Users". Click the "Add" icon to the right of the drop-down. Now, go to the top of the page and click "Create Graphs for this Host".
Under the "Graph Templates" section, click the checkbox beside "Create: Microsoft Terminal Services - Active Users". Go to the bottom of the page and click the icon "create". Enter the hostname (or ip address) of the windows machine, along with the username of "administrator" and password for the administrator account. Click "create" icon. You're done.
You could probably create a new account on the windows machine instead of using the administrator account, but I couldn't figure it out. It would probably involve giving the appropriate permissions under "Component Services" in the Control Panel.
If anyone figures out ways to improve on this, please post how you did it here.
Thanks and enjoy.