I have a group of servers I'm trying to find an optimal maintenance window for. My thought was to compare CPU usage on all the servers and find a time/day each week where they all consistently have low CPU usage to install patches and reboot the servers. Unfortunately it doesn't look like any of the reports built into PRTG have anywhere near this level of sophistication. Has anybody out there found a way to build a report similar to this or used an external program to grab PRTG data and create something like this?
Is there a way to do a CPU usage correlation report from PRTG
Votes:
0
2 Replies
Votes:
0
Hi rslater
I think thats not something you can achive with PRTG...BUT... Because I like scripting with powershell:
Create a textfile named "loadtimes.csv" with all you servers and enter something like:
Time;Server1;Server2;Server2;Server3;Server4;Server5
Create a textfile with all your servers in it, separated in each line (servers.txt)
Server1 Server2 Server3 Server4 Server5
Create a powershellscript (getLoads.ps1)
$servers = get-content servers.txt $varTime = get-date -Format t $servers | foreach-Object { $varCPU = Get-Wmiobject -computername $_ win32_processor | select LoadPercentage $Output = $Output + ";" + $varCPU.LoadPercentage } add-content loadtimes.txt $varTime$Output
Execute the Powershell script every 5 minutes or so. It will measure the CPU Loadtimes of your servers and enter the values in the file "Loadtimes.csv". First Line will be the time, the others the cpu load.
You may have to alter some things, because I use German timecode 24h
Output:
Time;Server1;Server2;Server2;Server3;Server4;Server5 14:41;26;30;19;44;13;26 14:42;57;7;19;24;15;33 14:43;54;8;22;15;7;35 14:44;4;16;26;16;10;12 14:45;4;18;21;4;43;5 14:46;18;8;12;16;30;15
Have fun
Thomas
Votes:
0
hmm....The PRTG data extractor might help you here. I think a manual process is fine since its something you might run every 3-6 months.
Just wack it over to excel, do some fancy charting on it and you should be able to see the dip you are looking for.
If you need to automate that, have a look at my PRTG Powershell API interface, it will let you automate the data extracting, and then you can code up the logic of when the best time is, or just get Powershell to chart it for you.
Or maybe you can use the sensor factory to group all the channels to one device, then just graph that. This does not scale very well.
On a side note (not directly related to your question, and can be ignored), outage windows should be defined in the service catalog for each service (at least in ITIL), and have been approved and agreed to by the business and IT. But like a said, it a very generic statement and does not suit many real life setups.
Let us know what you settle for.
Add comment