Windows 2000 / 2k3 Disk Statistics

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Windows 2000 / 2k3 Disk Statistics

Post by Phobos182 »

UPDATED 12.5.05
* Changes - Revision 2 *
- Fixed the Available Space problem. Now shows free space in GB
- Removed the Transfer Time section since I had no stats.
- Added Disk IO (Reads / Writes) to the graph. No visual element to prevent clutter. Just the stats
- Data Query / SNMP-Query / Data Templates & Graph updated. Please delete your current graphs & data sources, update the files, and create new graphs to see the new data.


Summary
I browsed the forums, and a few graphs that used WMI to grab disk statistics from Windows hosts, but none of them seemed to fit the bill entirely. I wanted a graph that would combine the Free Space utilization of the server, with the logical disk performance stats so I could monitor our EMC Clariion SAN performance.

I ran into a few roadblocks. First off, the WMI classes for Win32_PerfFormatted_LogicalDisk were not entirely available on Windows 2000, but fully supported on 2003. I could get the raw statistics, but did not want to do all of the math on the number, but wanted it presented to me. I found the best method was to install the free version of SNMP-Informant which takes the values from Perfmon on the server, and puts them into OID values on a custom SNMP MIB which you can query. This also helps, since it would be supported in Linux versus a straight WMI query for windows.

I then had a second problem. To analyze SAN performance, I wanted the Disk Reads and Disk Writes in Mileseconds (ms). This would let me see how long it took the OS to commit data to the SAN, and from there take a look at bottlenecks like clones, and snapshots through replication manager during certain times of the day. I would cross reference this to see if there was an impact on Windows performance. Utilizing Perfmon on the server in question yields the EXACT values I wanted (Like .009 / sec (9ms). The values in the SNMP MIB for SNMP-Informant shows 0. That sucks. Unless the ms is extremly high (more than 1/2 a second), it will not show. If anyone has experience on how to fix this, please reply. I have included it in the graph for future use if I find a fix.

I put in the obligatory %Disk Read / %Disk Write time. This does not necessarily indicate a performance bottleneck, but just a busy server. More of our high performance databases can be at 100% disk utilization, but still commit data at less than 10ms, which does not indicate a bottleneck. It's still useful for general server utilization.

Installation Steps
Installing the Required Files
1: Install SNMP-Informant Free Edition. It takes up little to no resources on a windows box (http://www.snmp-informant.com).
2: Go to the command prompt, and type in diskperf -y (Not necessary on a Windows 2003 Server)
3: Reboot specified server (required - In my testing, it's required for SNMP-Informant to work on a 2000 server.)
4: Copy the snmp_informant_disk.xml file into <cacti_path>/resources/snmp-queries/
5: Import the XML template for the graph (cacti_graph_template_w32_disk_statistics.xml)
6: Import the XML template for the data query (cacti_data_query_snmp_informant_disk_statistics.xml)

Associating the SNMP-Query
Now that you have the graph, and the script to gather the information, you must add the SNMP-Query to the server you would like to graph. This allows you to query a server, get the Logical Disks, and select which one you would like to graph. To do this
- Click on Devices
-> Click on the server in question
-> Under Associated Data Queries, click on the drop down box Add Data Query. Select SNMP - Informant Disk Statistics, and click the Add button.
-> You should now under Associated Data Queries see the SNMP - Informant Disk Statistics, and it should say something like "Success [6 Items, 6 Rows]". If it says 0 Items, you have a problem. Please post here
You have now associated this query, with this device. If you would like to save some time, you can follow the above steps under Host Templates, and associate this with a type of host (Like Windows 2000/XP) so you do not have to repeat this for each server.

Creating the Graph
Now that you have the query associated with the host / server in question, you can run this query, and select what Logical Disk you would like to graph. To do this, follow these steps.
- Click on Devices
-> Click on the server in question
-> Click on Create Graphs for this Host
-> You should see a section that says Data Query [SNMP - Informant Disk Statistics] Under this should be a list of all Logical Disks on the server
-> Select one, or mutiple logical disks you would like to graph. They should be highlighted Yellow. Scroll down to the bottom, and click on Create
Your graphs should now be created.

Conclusion
If you have any problems / questions. Please post here. I will do my best to answer them. If anybody would like to contribute to this graph, and try to help me get MS response time on Disk Reads / Writes, that would be appreciated.

Thanks!

Many thanks to Fred Dran for providing his XML template that I modified for this graph. Utilizing this template, and many hours researching on Cacti, I have gained a good grasp of SNMP Indexed queries.
Attachments
cacti_data_query_snmp_informant_disk_statistics.xml
Import Into Cacti via Import Templates
(37.6 KiB) Downloaded 16235 times
graph_image.php2.png
graph_image.php2.png (66.92 KiB) Viewed 177713 times
graph_image.php.png
graph_image.php.png (34.13 KiB) Viewed 177713 times
cacti_graph_template_w32_disk_statistics.xml
Import Into Cacti via Import Templates
(34.16 KiB) Downloaded 17251 times
snmp_informant_disk.xml
Save under &lt;CACTI_PATH&gt;/resources/snmp-queries
(2.21 KiB) Downloaded 20911 times
Last edited by Phobos182 on Tue Dec 06, 2005 3:04 pm, edited 20 times in total.
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
s16pt
Posts: 17
Joined: Mon Sep 12, 2005 12:03 am

Post by s16pt »

I follow your guide , but when I create graph.I got the empty column as the attachment.
Please give me a hand.Thanks.

Cacti: 0.8.6f(patched)
OS:Fedora Core 1
Attachments
Strange.jpg
Strange.jpg (25.82 KiB) Viewed 177760 times
cecbr
Posts: 1
Joined: Fri Dec 02, 2005 10:34 am

Missing step

Post by cecbr »

Hey,

I do not manage to execute this template correctly.

First, here is one missing step: Create the DATE QUERY. I did it, but it would like to verify it is correct.
- Click on Devices
-> Click on the server in question
-> Under Associated Data Queries, click on the drop down box Add Data Query. Select SNMP - Informant Disk Statistics, and click the Add button.
-> You should now under Associated Data Queries see the SNMP - Informant Disk Statistics, and it should say something like "Success [6 Items, 6 Rows]". If it says 0 Items, you have a problem. Please post here
You have now associated this query, with this device. If you would like to save some time, you can follow the above steps under Host Templates, and associate this with a type of host (Like Windows 2000/XP) so you do not have to repeat this for each server.
According to, after creating the graph, DATASOURCES are not generated in POLLER. Some explanation ?

Cacti: 0.8.6g

Tks.
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

s16pt wrote:I follow your guide , but when I create graph.I got the empty column as the attachment.
Please give me a hand.Thanks.

Cacti: 0.8.6f(patched)
OS:Fedora Core 1
Are you creating the graph through the SNMP-Query? Please see the attached screenshot, this is how you should be creating the graph.

If you click on Create Graphs, and Choose the graph from the drop down list, it will require you to fill in these values. To not have this show up, you must follow these steps.
Creating the Graph
Now that you have the query associated with the host / server in question, you can run this query, and select what Logical Disk you would like to graph. To do this, follow these steps.
- Click on Devices
-> Click on the server in question
-> Click on Create Graphs for this Host
-> You should see a section that says Data Query [SNMP - Informant Disk Statistics] Under this should be a list of all Logical Disks on the server
-> Select one, or mutiple logical disks you would like to graph. They should be highlighted Yellow. Scroll down to the bottom, and click on Create
Your graphs should now be created.
Attachments
selection.JPG
selection.JPG (61.73 KiB) Viewed 177714 times
Last edited by Phobos182 on Fri Dec 02, 2005 11:58 am, edited 1 time in total.
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Re: Missing step

Post by Phobos182 »

cecbr wrote:Hey,

I do not manage to execute this template correctly.

First, here is one missing step: Create the DATE QUERY. I did it, but it would like to verify it is correct.
- Click on Devices
-> Click on the server in question
-> Under Associated Data Queries, click on the drop down box Add Data Query. Select SNMP - Informant Disk Statistics, and click the Add button.
-> You should now under Associated Data Queries see the SNMP - Informant Disk Statistics, and it should say something like "Success [6 Items, 6 Rows]". If it says 0 Items, you have a problem. Please post here
You have now associated this query, with this device. If you would like to save some time, you can follow the above steps under Host Templates, and associate this with a type of host (Like Windows 2000/XP) so you do not have to repeat this for each server.
According to, after creating the graph, DATASOURCES are not generated in POLLER. Some explanation ?

Cacti: 0.8.6g

Tks.
You are specifically looking for the information provided in the screenshot I attached. No data sources are created when you associate an SNMP-Query with a Device. Data Sources are only created when you make a graph from the SNMP-Query
Attachments
query.JPG
query.JPG (90.93 KiB) Viewed 177715 times
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
throck
Posts: 3
Joined: Mon Dec 05, 2005 2:21 pm
Location: Durham, NC

Post by throck »

Phobos,

Thanks much for the templates, but it appears that the template you posted doesn't include the data query (which is probably why cecbr wasn't seeing it either) - would you mind exporting and posting that as well?

Thanks,

-throck
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

I do apologize. I have added it to the original post.

I just assumed it would be exported with the Data / Graph template. Sorry!
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
joshm
Cacti User
Posts: 82
Joined: Mon Oct 03, 2005 1:34 pm
Location: STL

Post by joshm »

Great template and nice to see some detailed instructions to prevent user error.


Thanks
Josh
86833884
Posts: 2
Joined: Wed Dec 21, 2005 12:03 am

No SNMP data returned ?

Post by 86833884 »

hello .
What happen! I using the Verbose Query for debugging, and returned is "No SNMP data returned" message.
Server os : Windows 2000 sp4
Cacti version : 0.8.6g
Attachments
No_SNMP_data_returned.jpg
No_SNMP_data_returned.jpg (94.34 KiB) Viewed 176870 times
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

1: Make sure SNMP-Informant is installed
2: On the command prompt, type in diskperf -y

Reboot the server.

That's the error you get when you did not reboot.
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
86833884
Posts: 2
Joined: Wed Dec 21, 2005 12:03 am

No data in graph!

Post by 86833884 »

thanks !
ok , i will be try on win2k server.
in addition , I use win2003 for try, and SNMP Query was successful. But no data in graph. SNMP Information version is Std-1.4. Server OS is Win2003SP1
Attachments
disk_io.jpg
disk_io.jpg (77.93 KiB) Viewed 176509 times
laffen
Cacti User
Posts: 56
Joined: Tue Jul 13, 2004 2:57 am
Location: Norway

Re: No data in graph!

Post by laffen »

86833884 wrote:thanks !
ok , i will be try on win2k server.
in addition , I use win2003 for try, and SNMP Query was successful. But no data in graph. SNMP Information version is Std-1.4. Server OS is Win2003SP1
I have the same result, win2003 and the graphs are fine except the disk performance.
rj
Posts: 5
Joined: Wed Dec 28, 2005 8:00 am

Post by rj »

I am running cacti 8.6g on SuSE 9.0. Polled Server is Win2K, SNMP Informant installed, Diskperf -y ran and rebooted. After i import the templates given here, I get

SNMP - Informant Disk Statistics (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]

Verbose Query gives the foll:

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/snmp_informant_disk.xml'
+ Error parsing XML file into an array.
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/snmp_informant_disk.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/snmp_informant_disk.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/snmp_informant_disk.xml'

I go to Data Queries --> SNMP - Informant Disk Statistics , it says XML file loaded sucessfully. I click on Disk Statistics , i get following error as shown in attachment. Same error for all entries.

Please help !!!
Attachments
Data Template-W32-Disk Statistics Error-1.JPG
Data Template-W32-Disk Statistics Error-1.JPG (62.66 KiB) Viewed 176301 times
rj
Posts: 5
Joined: Wed Dec 28, 2005 8:00 am

Post by rj »

Problem solved, Typo error in XML file snmp_informant_disk.xml.
joshm
Cacti User
Posts: 82
Joined: Mon Oct 03, 2005 1:34 pm
Location: STL

Post by joshm »

Just upgraded to H and it seems to have killed all existing graphs for this template.... Any ideas? At a glance it appears everything else went ok with the upgrade.


-Josh
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests