|
I'm back at the knowledge well, asking for more help.
I have mrtg up and running great...capturing router stats and server stats. For the servers, I found a dude who uses vbscripts to pull the WMI data from windows servers. works great, too.
question I have is how to plot multiple values on the graphs vs. just the in/out values. for example, I would like to plot the cpu load for a server that reports values for 4 cpu's. when using the following .cfg settings, I can only grab the first two. what file do I need to make changes to for allowing more than in/out, assign a separate color for each value and how?
I'm actually shooting for a graph similar to what NTOP displays with 8 - 12 variables plotted on one graph.
==============================================
Ylegend[AD0.wmi.cpuload]: % Disk Used
Options[AD0.wmi.cpuload]: growright,gauge
Target[AD0.wmi.cpuload]: `cscript.exe //nologo scripts/test/cpuload.vbs`
MaxBytes[AD0.wmi.cpuload]: 100
Title[AD0.wmi.cpuload]: ad0: CPU load balancing
ShortLegend[AD0.wmi.cpuload]: %
Legend1[AD0.wmi.cpuload]: CPU 0
Legend2[AD0.wmi.cpuload]: CPU 1
Legend3[AD0.wmi.cpuload]: CPU 2
Legend4[AD0.wmi.cpuload]: CPU 3
LegendI[AD0.wmi.cpuload]: % load:
LegendO[AD0.wmi.cpuload]: % load:
# Legend3I[AD0.wmi.cpuload]: % load:
# Legend4O[AD0.wmi.cpuload]: % load:
PageTop[AD0.wmi.cpuload]: <H1>ad0 - CPU Loading</H1>
========================================
the vbscript I use to pull the load values
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
arrComputers = Array("ad0")
For Each strComputer In arrComputers
' WScript.Echo
' WScript.Echo "=========================================="
' WScript.Echo "Computer: " & strComputer
' WScript.Echo "=========================================="
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo objItem.LoadPercentage
Next
Next
Function WMIDateStringToDate(dtmDate)
WScript.Echo dtm:
WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _
& " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) & ":" & Mid(dtmDate,13, 2))
End Function
==============================================
The values derived from the vbscript
38
18
0
2
thanx in advance!!!
|