Cacti Monitoring for Windows Servers

A little over four years ago I spent some time learning cacti and snmp to come up with a good solution to monitor Windows Servers. I had used Cacti several times previous to then, but never found any graphs that I really liked or any that would give me the level of detail that I was looking for. So I created my own and shared back to the Cacti community. To this day I still use these daily at home and at work, and they continue to work well. Today I am going to go through a quick installation of these templates into a new cacti install and then add a windows server 2008 to monitor.

I will be using a new Ubuntu Server 12.04 install for the cacti server. Once the server is built install cacti using the following and follow the screenshots.

sudo apt-get install cacti

Now connect to the web ui of cacti and configure

http://192.168.211.128/cacti  **Change IP to reflect your cacti server

All done. Now you will be redirected back to the login screen.

Login using admin/admin and then change password on next screen

Cacti is now installed.

Download the latest version of cacti from here. Version 13 is the latest at the time of writing this. Download it and extract the zip file. There is a readme.txt that explains where to place the files.

***UPDATE***

All new templates will be updated and current from GitHub.

https://github.com/mrlesmithjr/cacti.git

git clone https://github.com/mrlesmithjr/cacti/

Copy files from the resource\snmp_queries\ folder extracted to the cacti server using WinSCP to the /tmp folder.

Now on the cacti server cd /tmp

sudo cp snmp_informant_standard_*.xml /usr/share/cacti/site/resource/snmp_queries/

All done.

Now we have to import the xml template files from the \template folder into the cacti web ui.

In the cacti web ui go to Import/Export/Import Templates

Now browse to the folder where you extracted the zip file to and select the first cacti_host_template_windows_host_-_snmp_informant.xml and click import.

The templates are ready to be used now.

 

Now install SNMP informant Standard on your Windows machine you want to monitor. Get SNMP Informant from here. Download the 1.6 version. You need to have the Windows SNMP agent enabled and configured on your windows machine.

 

Now configure the SNMP Service

We are now ready to add our first Windows Server.

Under devices/add

Now select create graphs for this host and select the statistics you want to gather

Click create and do not change anything on the next screen. Select create again.

There are additional drop downs for Disk, memory and network stats. Make sure to go through select those as well.

Now you have to add the new device to the graph tree.

That’s it. Now just wait for a few minutes and you should start getting some nice looking graphs for your device.

Enjoy…

You can follow the thread over on the Cacti forum here.

You can download previous versions of the templates from here if you are getting XML parse errors importing.

 

44 thoughts on “Cacti Monitoring for Windows Servers

  1. Every time I try and import the templates, I get an XML PARSE error. Any help would be helpful. Trying to monitor multiple 2008 / 2012 servers and the more visual the better.

    Thanks

  2. Hello,

    I’m getting XML PARSE error when I trying to import the templates.
    The cacti version I’m running is 0.8.8b.
    Can you help me?

  3. hi,
    I am using your templates and it is working perfectly fine. But i want to get internet usage only.
    Right now the graphs which i am getting is showing both intranet and internet usage.
    How can i get separate graph for internet and intranet. Please help me out.

  4. Pingback: FoNtS Blog » Blog Archive » Cacti Windows Graphs

  5. Thanks so much, it worked perfectly and it so much better than others cacti templates for windows I was struggling with. The current version of snmp informant is 1.7 and it works with it.

    Rgds, Pierre

  6. @Roger Yeah dude you are using the wrong templates for disks. Remove all data queries that are not named SNMP_Informant_Standard and then create your graphs. The queries are the only ones needed. All of the other queries I do not keep up with.

  7. I have Cacti 0.8.8.a running on a CentOS VM.
    I followed these instructions. I got snmp informant 1.7, there was no 1.6 that I could see.

    When I add my Windows 2008 server as a device, I see the mounted partitions listed in cacti … looking good … but then the Used space graphs are just blank.

    In fact one Win2008 VM was working with the old 2003/xp host template, and I changed it to snmp informant, and its graphs are blanking out now too.

    What am I missing?

    thanks
    Roger

  8. @MLSJ, thanks and sure, but I don’t see a way to upload screen shots here, I can get a shot of a blank graph for a C drive or D drive etc, it’s just got no data. What other shots do you want to see?

  9. I am getting data for Logged in Users (14 logged in users? I don’t get that number, but it’s got blue data on the graph), Number of Processes and Network Connection traffic stats. So thats good… just no disk usage data.

  10. Hi,

    I'm using cacti Version 0.8.8b on Centos 6.5. I'm monitoring Windows 2012 R2 using SNMP Informant 1.7. CPU, Disk and Objects statistics are working fine / as expected. However, Memory and Network statistics doesn't work. If I run Verbose Query for Memory I get this:

    + Running data query [12].

    + Found type = '3' [SNMP Query].

    + Found data query XML file at '/usr/share/cacti/resource/snmp_queries/snmp_informant_standard_memory.xml'

    + XML file parsed ok.

    + missing in XML file, 'Index Count Changed' emulated by counting oid_index entries

    + Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.1.2' Index Count: 0

    + No SNMP data returned

    If I run snmpwalk command directly on the server where cacti is running, I do get resutls:

    snmpwalk -v2c -c public [windows-server-ip]:161 .1.3.6.1.4.1.9600.1.1.2

    SNMPv2-SMI::enterprises.9600.1.1.2.1.0 = Gauge32: 1611190272

    SNMPv2-SMI::enterprises.9600.1.1.2.2.0 = Gauge32: 22544948

    SNMPv2-SMI::enterprises.9600.1.1.2.3.0 = Gauge32: 22016

    It's similar with Network query. Can you please help me with this issue?

    Thanks!

  11. Hi,

    I'm using Version 0.8.8b on Windows 2012 R2 with SNMP informant Standard 1.7. I've flowed instructions in this thread and got it working quite fast, thanks for this! However, I have two issues. CPU, Disk and Objects statistics works fine, whereas Memory and Network statistics doesn't. This is what is returned from debug query:

    + Running data query [12].

    + Found type = '3' [SNMP Query].

    + Found data query XML file at '/usr/share/cacti/resource/snmp_queries/snmp_informant_standard_memory.xml'

    + XML file parsed ok.

    + missing in XML file, 'Index Count Changed' emulated by counting oid_index entries

    + Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.1.2' Index Count: 0

    + No SNMP data returned

    If I run a direct snmpwalk query on the cacti server it looks fine:

    # snmpwalk -v2c -c public [ip of my win server]:161 .1.3.6.1.4.1.9600.1.1.2

    SNMPv2-SMI::enterprises.9600.1.1.2.1.0 = Gauge32: 888221696

    SNMPv2-SMI::enterprises.9600.1.1.2.2.0 = Gauge32: 21838924

    SNMPv2-SMI::enterprises.9600.1.1.2.3.0 = Gauge32: 21327

    SNMPv2-SMI::enterprises.9600.1.1.2.4.0 = Gauge32: 368123084

    Do you have any idea why cacti snmp queries for Memory and Network doesn't work?

  12. With Cacti 0.8.8b and Templates from https://github.com/mrlesmithjr/cacti have this error after verbose query. And I can't create graphs.

    + Running data query [10].

    + Found type = '3' [SNMP Query].

    + Found data query XML file at '/usr/share/cacti/resource/snmp_queries/snmp_informant_standard_cpu.xml'

    + Error parsing XML file into an array.

    + Found data query XML file at '/usr/share/cacti/resource/snmp_queries/snmp_informant_standard_cpu.xml'

    + Found data query XML file at '/usr/share/cacti/resource/snmp_queries/snmp_informant_standard_cpu.xml'

    + Found data query XML file at '/usr/share/cacti/resource/snmp_queries/snmp_informant_standard_cpu.xml'

    • @JosephIDM – I have used these Windows templates to monitor up to 16+ CPUs over the years without any issue.

    • Red – Please verify you are using 0.8.8b. The latest version of the templates will/has worked for almost a year on this version. However on a fresh Ubuntu 14.04LTS install I was able to duplicate the same issue because Ubuntu is not installing 0.8.8b but 0.8.7i and the templates will not import correctly. However if you go to this link http://everythingshouldbevirtual.com/cacti-templa… you can download all versions of the templates. v13 of the template works with 0.8.7i or you can upgrade cacti to 0.8.8b whichever makes sense.

      • Hi,

        Im using 8.8b installed today on Windows 7 64 bit. Everything working fine (not graphs time even in correct timezone in php.ini) but I'm unable to import templates 🙁

        I have no experience on Cacti but I have no error and it's working fine (as far as I know).

        regards.

        Red.

  13. Hi,

    Am facing the below issue can anyone help me ..

    + Running data query [10].
    + Found type = ‘3’ [SNMP Query].
    + Found data query XML file at ‘C:/inetpub/wwwroot/cacti/resource/snmp_queries/snmp_informant_standard_cpu.xml’
    + XML file parsed ok.
    + missing in XML file, ‘Index Count Changed’ emulated by counting oid_index entries
    + Executing SNMP walk for list of indexes @ ‘.1.3.6.1.4.1.9600.1.1.5.1’ Index Count: 0
    + No SNMP data returned

    The same error for network,CPU,memory, objects statics too.

    Regards,
    Bala

  14. Pingback: How to : Monitoring Windows via WMI from Cacti on Ubuntu | morndej's blog

  15. I have a problem when i want to import cacti_host_template_snmp_informant_windows.xml, in cacti web appear: Error: XML parse error. I dont know what can i do 🙁 can you help me?

  16. Hi, when I try to add a windows 2012 r2 host to my cacti 0.8.8b I get the following when I try to create the graphs.

    Data Query [SNMP_Informant_Standard – CPU Statistics]
    This data query returned 0 rows, perhaps there was a problem executing this data query

    All other data queries return 0 rows as well.
    When I debug the query I get +3000 items from the host.
    Any suggestions on what might be missing?

    Data Query Debug Information
    + Running data query [10].
    + Found type = ‘3’ [SNMP Query].
    + Found data query XML file at ‘/home/default/public_html/cacti/resource/snmp_queries/snmp_informant_standard_cpu.xml’
    + XML file parsed ok.
    + missing in XML file, ‘Index Count Changed’ emulated by counting oid_index entries
    + Executing SNMP walk for list of indexes @ ” Index Count: 3133
    + Index found at OID: ‘sysDescr.0’ value: ‘Hardware: Intel64 Family 6 Model 63 Stepping 2 AT/AT COMPATIBLE – Software: Windows Version 6.3 (Build 9600 Multiprocessor Free)’
    + Index found at OID: ‘sysObjectID.0’ value: ‘OID: enterprises.311.1.1.3.1.2’
    + Index found at OID: ‘sysUpTimeInstance’ value: ‘129465’
    + Index found at OID: ‘sysContact.0’ value: ”
    + Index found at OID: ‘sysName.0’ value: ‘TS.molabv.local’
    + Index found at OID: ‘sysLocation.0’ value: ”
    + Index found at OID: ‘sysServices.0′ value: ’76’
    + Index found at OID: ‘ifNumber.0′ value: ’22’

Leave a Reply

Your email address will not be published. Required fields are marked *

*