My version of Win32 Disk Stats
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 130
- Joined: Thu Mar 31, 2005 4:24 pm
- Location: Sydney, Asutralia
- Contact:
My version of Win32 Disk Stats
Hi,
My script is similair to an earlier post (http://forums.cacti.net/viewtopic.php?t ... statistics). Instead of using SNMP I have used WMI.
Recreated it as the one in the post did not work very well.
If you are going to montior other servers on the network you will need to modify a section of the script to include a local account common to all the machines or a domain account. This account needs admin access.
Networkusername="username"
Networkpassword="password"
OR
Networkusername="DOMAIN\username"
Networkpassword="password"
This script is only for Windows and has been tested on Windows 2003.
Enjoy
My script is similair to an earlier post (http://forums.cacti.net/viewtopic.php?t ... statistics). Instead of using SNMP I have used WMI.
Recreated it as the one in the post did not work very well.
If you are going to montior other servers on the network you will need to modify a section of the script to include a local account common to all the machines or a domain account. This account needs admin access.
Networkusername="username"
Networkpassword="password"
OR
Networkusername="DOMAIN\username"
Networkpassword="password"
This script is only for Windows and has been tested on Windows 2003.
Enjoy
- Attachments
-
- Disk Stats.zip
- (33.1 KiB) Downloaded 2462 times
-
- DiskStats.gif (25.23 KiB) Viewed 32705 times
Disk stat issues
Hi
doesnt work cant import the graph and data template
please advise
Tanks
doesnt work cant import the graph and data template
please advise
Tanks
-
- Cacti User
- Posts: 130
- Joined: Thu Mar 31, 2005 4:24 pm
- Location: Sydney, Asutralia
- Contact:
mmm If you are using the latest open the templates in IE and fix any errors.
I use " alot in my templates and it subsitues it for " when when you export and does not like to reimport them
For example -
<value>"localhost"</value>
---------------^
I have attached the two templates that will import.
I use " alot in my templates and it subsitues it for " when when you export and does not like to reimport them
For example -
<value>"localhost"</value>
---------------^
I have attached the two templates that will import.
- Attachments
-
- cacti_data_template_windows_disk_stats_wmi.xml
- (11.02 KiB) Downloaded 1923 times
-
- cacti_graph_template_windows_disk_stats_wmi.xml
- (35.42 KiB) Downloaded 2127 times
Disk stat issues
Hi,
thanks now the import part is working ,but where and how should use the vbs script?
thanks in advanced.
thanks now the import part is working ,but where and how should use the vbs script?
thanks in advanced.
Disk stst issue
Hi again,
Even tough I have placed the script in scripts folder and filled the user/pass section with admin right still no data "Nan" and I get error in cacti log
Also I have tried to run the script manually and i get error you can see on attached screenshot
Even tough I have placed the script in scripts folder and filled the user/pass section with admin right still no data "Nan" and I get error in cacti log
Also I have tried to run the script manually and i get error you can see on attached screenshot
- Attachments
-
- error screen shoot
- disk-error.png (14.6 KiB) Viewed 32223 times
Disk WMI problems - Help.
New Cacti User,
I am having the same problem and if I run poller from CMD prompt I get the following error. I have confirmed user/passwd, The cscript cmd runs fine from the CMD prompt.
C:\Inetpub\wwwroot\cacti\scripts\w32_WMI_logical_disks.vbs
Data Input String = C:/WINDOWS/system32/cscript.exe //Nologo <path_cacti>/scripts/w32_WMI_logical_disks.vbs <Hostname><diskname>
Cacti Log;
12/21/2006 04:30:03 PM - CMDPHP: Poller[0] Host[2] DS[126] WARNING: Result from CMD not valid. Partial Result:
C:\php>php C:\Inetpub\wwwroot\Cacti\poller.php
OK u:0.00 s:0.00 r:0.12
OK u:0.00 s:0.00 r:0.12
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:0.16
OK u:0.00 s:0.00 r:0.16
OK u:0.00 s:0.00 r:0.16
OK u:0.00 s:0.00 r:0.17
OK u:0.00 s:0.00 r:0.17
OK u:0.00 s:0.00 r:0.17
ERROR: Not enough arguments
OK u:0.00 s:0.03 r:0.19
It seems a lot of people provide this but I am not sure why...
Data Source Debug
c:/rrdtool/rrdtool.exe create \
c:/Inetpub/wwwroot/cacti/rra/localhost_avgdisksecperread_126.rrd \
--step 300 \
DS:AvgDiskReadQueueLen:GAUGE:600:0:100 \
DS:FreeMegabytes:GAUGE:600:0:U \
DS:AvgDiskWriteQueueLe:GAUGE:600:0:100 \
DS:PercentFreeSpace:GAUGE:600:0:100 \
DS:PercentDiskWriteTim:GAUGE:600:0:100 \
DS:AvgDiskSecPerRead:GAUGE:600:0:U \
DS:AvgDiskSecPerWrite:GAUGE:600:0:U \
DS:PercentDiskReadTime:GAUGE:600:0:100 \
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:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN: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 \
I am having the same problem and if I run poller from CMD prompt I get the following error. I have confirmed user/passwd, The cscript cmd runs fine from the CMD prompt.
C:\Inetpub\wwwroot\cacti\scripts\w32_WMI_logical_disks.vbs
Data Input String = C:/WINDOWS/system32/cscript.exe //Nologo <path_cacti>/scripts/w32_WMI_logical_disks.vbs <Hostname><diskname>
Cacti Log;
12/21/2006 04:30:03 PM - CMDPHP: Poller[0] Host[2] DS[126] WARNING: Result from CMD not valid. Partial Result:
C:\php>php C:\Inetpub\wwwroot\Cacti\poller.php
OK u:0.00 s:0.00 r:0.12
OK u:0.00 s:0.00 r:0.12
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:0.16
OK u:0.00 s:0.00 r:0.16
OK u:0.00 s:0.00 r:0.16
OK u:0.00 s:0.00 r:0.17
OK u:0.00 s:0.00 r:0.17
OK u:0.00 s:0.00 r:0.17
ERROR: Not enough arguments
OK u:0.00 s:0.03 r:0.19
It seems a lot of people provide this but I am not sure why...
Data Source Debug
c:/rrdtool/rrdtool.exe create \
c:/Inetpub/wwwroot/cacti/rra/localhost_avgdisksecperread_126.rrd \
--step 300 \
DS:AvgDiskReadQueueLen:GAUGE:600:0:100 \
DS:FreeMegabytes:GAUGE:600:0:U \
DS:AvgDiskWriteQueueLe:GAUGE:600:0:100 \
DS:PercentFreeSpace:GAUGE:600:0:100 \
DS:PercentDiskWriteTim:GAUGE:600:0:100 \
DS:AvgDiskSecPerRead:GAUGE:600:0:U \
DS:AvgDiskSecPerWrite:GAUGE:600:0:U \
DS:PercentDiskReadTime:GAUGE:600:0:100 \
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:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN: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 \
SubScript out of range from CMD line
You do not have all the Arguments in the CMD line
cscript w32_WMI_logical_disks.vbs localhost C:
cscript w32_WMI_logical_disks.vbs localhost C:
-
- Cacti User
- Posts: 130
- Joined: Thu Mar 31, 2005 4:24 pm
- Location: Sydney, Asutralia
- Contact:
Your data input has taken the spaces out -
w32_WMI_logical_disks.vbs <Hostname><diskname>
Should read -
w32_WMI_logical_disks.vbs <Hostname> <diskname>
If you want to run it from the command line do something like -
cscript w32_WMI_logical_disks.vbs localhost C:
You will always need two arguements after the script
w32_WMI_logical_disks.vbs <Hostname><diskname>
Should read -
w32_WMI_logical_disks.vbs <Hostname> <diskname>
If you want to run it from the command line do something like -
cscript w32_WMI_logical_disks.vbs localhost C:
You will always need two arguements after the script
Error is still there DISK WMI - ERROR: Not enough arguments
I have fixed this. (I must have changed it when troubleshooting)
However the problem is still there... If I delete the Data Input for this WMI the "ERROR: Not enough arguments" no longer appears.
C:/WINDOWS/system32/cscript.exe //Nologo <path_cacti>/scripts/w32_WMI_logical_disks.vbs <Hostname> <diskname>
C:\php>php C:\Inetpub\wwwroot\Cacti\poller.php
OK u:0.00 s:0.00 r:0.00
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.03
OK u:0.01 s:0.00 r:0.05
OK u:0.01 s:0.00 r:0.05
OK u:0.01 s:0.00 r:0.05
ERROR: Not enough arguments
OK u:0.01 s:0.00 r:0.06
OK u:0.01 s:0.00 r:0.06
My end goal is to monitor the same Disk values via WMI so if someone can assist. please do.
Thanks for the help in advance.
However the problem is still there... If I delete the Data Input for this WMI the "ERROR: Not enough arguments" no longer appears.
C:/WINDOWS/system32/cscript.exe //Nologo <path_cacti>/scripts/w32_WMI_logical_disks.vbs <Hostname> <diskname>
C:\php>php C:\Inetpub\wwwroot\Cacti\poller.php
OK u:0.00 s:0.00 r:0.00
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.03
OK u:0.01 s:0.00 r:0.05
OK u:0.01 s:0.00 r:0.05
OK u:0.01 s:0.00 r:0.05
ERROR: Not enough arguments
OK u:0.01 s:0.00 r:0.06
OK u:0.01 s:0.00 r:0.06
My end goal is to monitor the same Disk values via WMI so if someone can assist. please do.
Thanks for the help in advance.
Cacti Log regarding this issue;
12/21/2006 10:57:30 PM - CMDPHP: Poller[0] Host[2] DS[126] WARNING: Result from CMD not valid. Partial Result:
When run from CMD lline;
C:\Inetpub\wwwroot\cacti\scripts>cscript //nologo 32_WMI_logical_disks.vbs localhost C:
FreeMegabytes:60 AvgDiskReadQueueLength:0 AvgDiskWriteQueueLength:0 PercentDiskR
eadTime:0 PercentDiskWriteTime:0 PercentFreeSpace:89 AvgDiskSecPerRead:0 AvgDisk
SecPerWrite:0
Thanks
12/21/2006 10:57:30 PM - CMDPHP: Poller[0] Host[2] DS[126] WARNING: Result from CMD not valid. Partial Result:
When run from CMD lline;
C:\Inetpub\wwwroot\cacti\scripts>cscript //nologo 32_WMI_logical_disks.vbs localhost C:
FreeMegabytes:60 AvgDiskReadQueueLength:0 AvgDiskWriteQueueLength:0 PercentDiskR
eadTime:0 PercentDiskWriteTime:0 PercentFreeSpace:89 AvgDiskSecPerRead:0 AvgDisk
SecPerWrite:0
Thanks
Who is online
Users browsing this forum: No registered users and 0 guests