Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Unfortunately, since delims=, that's why we're getting "wait..." for the second Results since it too is being parsed. I'll have to think about a different method of extracting this info out when I've got time.
http://www.robvanderwoude.com is a great site for batch/other scripting tips/samples.
No point releasing the PS script since Cacti string parsing/cleaning needs to be fixed first (bug #2008)
Cool, figured it out (I hope). Long story short, since typeperf is outputing 2 lines that meet the delims criteria, I just setup an "array" variable RESULT.x, where x is incremented in the DO loop, and just echo out the first value. I also had to turn on setlocal enabledelayedexpansion, here is an article about it for the curious: http://www.robvanderwoude.com/variableexpansion.php
Hi BSOD2600 , i have a new question , I have used this script and drew many graphs.
now , i have many hosts need to be monitored by cacti, what should i do ?
Setting Data Sources and Graph Management for per host ,its too much trouble.
Colud you please give me some advice?
Thank you very much.
Could it be RRDtools version issue? There are v1.0, v1.2, v1.3 and v1.4 available in dropdown list in settings. I did not find it in rrdtool.exe properties and changed it from default to v1.4. What was the version included with windows installer?
the last 2 Win Installers have deployed rrdtool 1.4.
You could also be running into a Windows security/permission issue with ecnswn20p. open a command prompt AS the user account which runs the Cacti Scheduled task. verify with the whoami command. Does the typeperf command still return data?
BSOD2600 wrote:the last 2 Win Installers have deployed rrdtool 1.4.
You could also be running into a Windows security/permission issue with ecnswn20p. open a command prompt AS the user account which runs the Cacti Scheduled task. verify with the whoami command. Does the typeperf command still return data?
You right. Installer had set scheduled task to local system account. Had to change it to an account with sufficient rights to other hosts.
You do realize that Cacti comes with SNMP templates for cpu/disk/network which is far more efficient than perfmon queries?
BSOD2600
Thanks for being extremely helpful.
And yes, I realize the benefits of using SNMP. I just want to be sure that I could migrate what I already have on an older server which served me well (again thanks to you) for the past 5 years. SNMP will be the next step.