Windows Disk utilization script and template
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 66
- Joined: Sat Dec 06, 2003 12:44 pm
- Location: Winchester, MA
Windows Disk utilization script and template
A Perl script that uses WMI to get both total and free disk space for a w32 host. It can be used as a template for other indexed WMI classes and or return other values. Just type the script name at a dos prompt for info on usage.
I also have a data query/indexed version of this, but it requires IIS and also has some configuration requirements. If you are interested let me know and i'll post it too.
I also have a data query/indexed version of this, but it requires IIS and also has some configuration requirements. If you are interested let me know and i'll post it too.
- Attachments
-
- cacti_graph_template_w32_hard_drive_space.xml
- (11.79 KiB) Downloaded 1512 times
-
- w32_query_LogicalDisk.pl.txt
- (5.3 KiB) Downloaded 2186 times
-
- Cacti User
- Posts: 66
- Joined: Sat Dec 06, 2003 12:44 pm
- Location: Winchester, MA
-
- Cacti User
- Posts: 66
- Joined: Sat Dec 06, 2003 12:44 pm
- Location: Winchester, MA
This would be the query/indexed version of the script. The readme file contains instructions on how to install it.
Let me know if you have any questions regarding the changes to IIS.
Cheers
Let me know if you have any questions regarding the changes to IIS.
Cheers
- Attachments
-
- w32-disk space.zip
- data query/indexed version
- (6.01 KiB) Downloaded 1146 times
Hi
I'm asking for help here, cause I cannot get my values recorded in the rrd file...
The poller log in debug mode displays theses lines:
Well, It seems to work, but the rrd file is not update.. the graph always displays "-1.#J"
In the Graph Management page, with the debug mode on, RRDTools says "ok".. so, I don't know what goes wrong....
Help !!
I'm asking for help here, cause I cannot get my values recorded in the rrd file...
The poller log in debug mode displays theses lines:
Code: Select all
10/12/2004 03:10:10 PM - CMDPHP: Poller[0] Host[131] CMD: perl D:\www\cacti33/scripts/w32_query_LogicalDisk.pl 192.168.1.16 get freespace,size c:, output: freespace:9746927616 size:15208509440
In the Graph Management page, with the debug mode on, RRDTools says "ok".. so, I don't know what goes wrong....
Help !!
Tiago Coimbra
Gruyère Energie
Gruyère Energie
-
- Cacti User
- Posts: 66
- Joined: Sat Dec 06, 2003 12:44 pm
- Location: Winchester, MA
Hi !
Thanks for you quick answer...
I checked the items datasource names, and they match witch the datasources in the rrd file. Here is the datasource debug print:
The graph debug just says "ok"
The graph source properties (5min) displays:
The file is created and all seems to be ok... I checked with the rrdtool command line (info) and the datasources are correct....
I'm using cacti 0.8.6, php 4.3.8 and rrdtool 1.0.48...
don't know what's wrong :-/
Hope you can help.. thanks !!
Thanks for you quick answer...
I checked the items datasource names, and they match witch the datasources in the rrd file. Here is the datasource debug print:
Code: Select all
d:/rrdtool/src/tool_release/rrdtool.exe create \
D:\www\cacti33/rra/websudback_w32_hdd_free_672.rrd \
--step 300 \
DS:w32_hdd_size:GAUGE:600:0:U \
DS:w32_hdd_free:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
The graph source properties (5min) displays:
Code: Select all
d:/rrdtool/src/tool_release/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Websud-Back - Drive Space - C" \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
DEF:a="D\:\www\cacti33/rra/websudback_w32_hdd_free_672.rrd":w32_hdd_size:AVERAGE \
DEF:b="D\:\www\cacti33/rra/websudback_w32_hdd_free_672.rrd":w32_hdd_free:AVERAGE \
AREA:a#0000FF:"Total" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
AREA:b#F24AC8:"Free" \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s"
I'm using cacti 0.8.6, php 4.3.8 and rrdtool 1.0.48...
don't know what's wrong :-/
Hope you can help.. thanks !!
Tiago Coimbra
Gruyère Energie
Gruyère Energie
-
- Cacti User
- Posts: 66
- Joined: Sat Dec 06, 2003 12:44 pm
- Location: Winchester, MA
Thanks !!
It works now
Well, fo those who have the same problem, just change in the output method the command line. Cacti is now Case-sensitive with the values name.
Here is the line:
It works now
Well, fo those who have the same problem, just change in the output method the command line. Cacti is now Case-sensitive with the values name.
Here is the line:
Code: Select all
perl <path_cacti>/scripts/w32_query_LogicalDisk.pl <hostname> get FreeSpace,Size <driveletter>
Tiago Coimbra
Gruyère Energie
Gruyère Energie
-
- Posts: 13
- Joined: Thu Sep 16, 2004 12:32 pm
Re:
Hi,
Can you post the graph on the forum?
Thanks,
Jaya.
Can you post the graph on the forum?
Thanks,
Jaya.
-
- Posts: 13
- Joined: Thu Sep 16, 2004 12:32 pm
-
- Posts: 13
- Joined: Thu Sep 16, 2004 12:32 pm
-
- Posts: 13
- Joined: Thu Sep 16, 2004 12:32 pm
Re:
Thanks Scipio. I recreated the data source and also made some changes in the data input methods to match the code. As said in the earlier post cacti is case sensitive. Graph is working!
Thanks,
Jaya.
Thanks,
Jaya.
-
- Posts: 32
- Joined: Wed Mar 02, 2005 11:58 am
Who is online
Users browsing this forum: No registered users and 2 guests