Host-Resources-V2 Disk Usage ( Windows )
Moderators: Developers, Moderators
Host-Resources-V2 Disk Usage ( Windows )
***************************************************
** NEW VERSION **
Leaving the original posts to so the prograssion of the graph
***************************************************
This graph uses the Host-Resources-V2 MIB to gather Disk usage.
I have tested this on Windows platforms, but not on any other Host-Reources-V2 compliant SNMPD.
I can never pick nice colors, so go nuts on that and if you find something that looks really sharp, let me know!
Image to follow on the next post… the forums should let you attach more…
What it Graphs
--------------------
* Allocated Disk Size
* Disk Allocation Used
* Disk Allocation Failures
The disk allocation failures is a handy thing for those using threshld, you can easily add a monitor to it to report when the machine was unable to write to the disk, due to the lack of space.
XML Data Query File
----------------------------
<interface>
<name>Host-Resources-V2 - Disk Stats</name>
<description>Using HOST-RESOURCES-V2-MIB Queries a host for a list of Disk(s) and thier stats</description>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<fields>
<hostresInstance>
<name>Disk Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</hostresInstance>
<hostresDescription>
<name>Disk Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.3</oid>
</hostresDescription>
<hostresAllocation>
<name>Disk Description</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.5</oid>
</hostresAllocation>
<hostresUsed>
<name>Disk Description</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.6</oid>
</hostresUsed>
<hostresFailures>
<name>Disk Description</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.7</oid>
</hostresFailures>
</fields>
</interface>
** NEW VERSION **
Leaving the original posts to so the prograssion of the graph
***************************************************
This graph uses the Host-Resources-V2 MIB to gather Disk usage.
I have tested this on Windows platforms, but not on any other Host-Reources-V2 compliant SNMPD.
I can never pick nice colors, so go nuts on that and if you find something that looks really sharp, let me know!
Image to follow on the next post… the forums should let you attach more…
What it Graphs
--------------------
* Allocated Disk Size
* Disk Allocation Used
* Disk Allocation Failures
The disk allocation failures is a handy thing for those using threshld, you can easily add a monitor to it to report when the machine was unable to write to the disk, due to the lack of space.
XML Data Query File
----------------------------
<interface>
<name>Host-Resources-V2 - Disk Stats</name>
<description>Using HOST-RESOURCES-V2-MIB Queries a host for a list of Disk(s) and thier stats</description>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<fields>
<hostresInstance>
<name>Disk Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</hostresInstance>
<hostresDescription>
<name>Disk Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.3</oid>
</hostresDescription>
<hostresAllocation>
<name>Disk Description</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.5</oid>
</hostresAllocation>
<hostresUsed>
<name>Disk Description</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.6</oid>
</hostresUsed>
<hostresFailures>
<name>Disk Description</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.7</oid>
</hostresFailures>
</fields>
</interface>
- Attachments
-
- cacti_data_query_snmp_hostresources_v2_disk.xml
- (18.38 KiB) Downloaded 902 times
-
- cacti_data_template_snmp_hostresourcesv2_disk.xml
- (7.78 KiB) Downloaded 899 times
-
- cacti_graph_template_snmp_hostresources_v2_disk.xml
- (16.85 KiB) Downloaded 1038 times
Last edited by ajeskey on Tue Apr 12, 2005 10:56 am, edited 4 times in total.
***************************************************
** NEW VERSION 04/12/2005 **
***************************************************
* Cleaned up some of the GPRINTs
* Set the failures to a white line at the bottom, so that people wont question why there is red on the graph.
* Picked some better colors.
* Removed all the extra padding on the top of the graph
( oh and i am zipping it so i can't complain about the lack of attachments anymore )
** NEW VERSION 04/12/2005 **
***************************************************
* Cleaned up some of the GPRINTs
* Set the failures to a white line at the bottom, so that people wont question why there is red on the graph.
* Picked some better colors.
* Removed all the extra padding on the top of the graph
( oh and i am zipping it so i can't complain about the lack of attachments anymore )
- Attachments
-
- SNMP Host-Resources-V2 Disk.zip
- (8.32 KiB) Downloaded 1137 times
-
- hostresources-disk.JPG (36.66 KiB) Viewed 21151 times
dose not work For me
Warning: Variable passed to each() is not an array or object in C:\Apache2\htdocs\cacti\lib\data_query.php on line 490
Warning: Cannot modify header information - headers already sent by (output started at C:\Apache2\htdocs\cacti\lib\data_query.php:490) in C:\Apache2\htdocs\cacti\host.php on line 70
Warning: Variable passed to each() is not an array or object in C:\Apache2\htdocs\cacti\lib\data_query.php on line 490
Warning: Cannot modify header information - headers already sent by (output started at C:\Apache2\htdocs\cacti\lib\data_query.php:490) in C:\Apache2\htdocs\cacti\host.php on line 70
Won't work for me either. I imported the following 3 files from the zip file,
cacti_data_query_snmp_hostresources_v2_disk.xml
cacti_data_template_snmp_hostresourcesv2_disk.xml
cacti_graph_template_snmp_hostresources_v2_disk.xml
and get the error
Warning: Variable passed to each() is not an array or object in C:\Apache2\htdocs\cacti\lib\data_query.php on line 490
Warning: Cannot modify header information - headers already sent by (output started at C:\Apache2\htdocs\cacti\lib\data_query.php:490) in C:\Apache2\htdocs\cacti\host.php on line 75
when trying to do the data query. running 0.8.6c.
would be great to see this working
Mark
cacti_data_query_snmp_hostresources_v2_disk.xml
cacti_data_template_snmp_hostresourcesv2_disk.xml
cacti_graph_template_snmp_hostresources_v2_disk.xml
and get the error
Warning: Variable passed to each() is not an array or object in C:\Apache2\htdocs\cacti\lib\data_query.php on line 490
Warning: Cannot modify header information - headers already sent by (output started at C:\Apache2\htdocs\cacti\lib\data_query.php:490) in C:\Apache2\htdocs\cacti\host.php on line 75
when trying to do the data query. running 0.8.6c.
would be great to see this working
Mark
Here it is again you should be able to jus timport this one and have it work... make sure that your script has permisions to be rad by cacti, and that you are running 8.6c
- Attachments
-
- cacti_graph_template_snmp_hostresources_v2_disk.xml
- (15.81 KiB) Downloaded 1011 times
Hello ajeskey,
I just came across your CPU and Disk SNMP Informat scripts and have some trouble making them work. As I am a new cacti user I suspect user error however I thought I would ask here in case my problem is version specific and not of my own causeing.
I originally had the same errors with both of your scripts as mentioned by previous people in this thread (array + each) related. I patched the cacti files in question to better handle that particular error and ended up with the following:
I receive the same for the disk query when doing the verbose query except it shows win32_disk.xml instead of win32_cpu.xml. I checked on that file and it is correct it is not in that folder (neither of them that is). I ran locate for win32 and it found neither of those files anywhere on my machine. Additionally in the menu for the graph templates there is no option for any of the SNMP Informant graphs I imported. Your scripts are the first I have imported so I may very well be doing something wrong.
I am using cacti 0.8.6d installed 2 days ago.
Thanks for your time and sorry for the questions if they are silly,
Cheers, TC
I just came across your CPU and Disk SNMP Informat scripts and have some trouble making them work. As I am a new cacti user I suspect user error however I thought I would ask here in case my problem is version specific and not of my own causeing.
I originally had the same errors with both of your scripts as mentioned by previous people in this thread (array + each) related. I patched the cacti files in question to better handle that particular error and ended up with the following:
Code: Select all
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Could not find data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/win32_cpu.xml'
+ Error parsing XML file into an array.
+ Could not find data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/win32_cpu.xml'
+ Could not find data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/win32_cpu.xml'
+ Could not find data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/win32_cpu.xml'
I am using cacti 0.8.6d installed 2 days ago.
Thanks for your time and sorry for the questions if they are silly,
Cheers, TC
Works with Net-SNMP machines
I just wanted to tell that theses templates works well on Net-SNMP machines (mostly Unix ones...) and they are not limited to Windows only
i agree ! I monitor a few windows boxes from a linux box. it works perfectly and shows the right value for the harddisk usage but for physical memory and virtual memory it shows not the correct value or did i a mistake ?
- Attachments
-
- graph_110_1.png (3.35 KiB) Viewed 19479 times
-
- currently the windows task manager shows something else : USAGE 272 MB !
- graph_111_1.png (3.51 KiB) Viewed 19479 times
http://www.lounge-radio.com/
I am working on something to do Physical memory. Should be done by the end of the day (i've had it for months but its not very intuitive, so I am just cleaning it up)
As for the Vistual Memory. That is kind of an odd thing, it seems to only show what it's allocated from the page file for what is in RAM and what is on disk. I do see it trend differently on hosts, and I do see it go up when a machine eats all of its Physical memory. But you wont see that until I get you the Physical Memory graph
I'll keep you guys posted.
As for the Vistual Memory. That is kind of an odd thing, it seems to only show what it's allocated from the page file for what is in RAM and what is on disk. I do see it trend differently on hosts, and I do see it go up when a machine eats all of its Physical memory. But you wont see that until I get you the Physical Memory graph
I'll keep you guys posted.
- Aaron Jeskey
Who is online
Users browsing this forum: No registered users and 8 guests