CUP Usage and memory usage
Hello,
We're interesting in monitoring the CPU Usage % and memory usage in % to get these values average every month with a SQL query (the Serverscheck is linked with a SQL Server database).
The problems with the rules that monitoring memory and CPU are that the returned value is not in %. And the CPU usage doesn't work with more than 1 cpu and all our servers have more than 1 CPU. So I've wroten a vbs script that looks for via WMI this value and the Script works nice.
But now I want that Serverscheks uses these values to get the SLA and with the external rules, the values are not stored as in the rest of rule types.
How can I do to get these values in the serversCheck?
Greetings,
Francesc
We're interesting in monitoring the CPU Usage % and memory usage in % to get these values average every month with a SQL query (the Serverscheck is linked with a SQL Server database).
The problems with the rules that monitoring memory and CPU are that the returned value is not in %. And the CPU usage doesn't work with more than 1 cpu and all our servers have more than 1 CPU. So I've wroten a vbs script that looks for via WMI this value and the Script works nice.
But now I want that Serverscheks uses these values to get the SLA and with the external rules, the values are not stored as in the rest of rule types.
How can I do to get these values in the serversCheck?
Greetings,
Francesc
This discussion has been closed.
Comments
With WMI is really simple to do:
On Error Resume Next
strComputer = "server_name"
Set objWMIService = GetObject("winmgmts:" & strComputer & "rootcimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)
For Each objItem in colItems
Wscript.Echo "LoadPercentage: " & objItem.LoadPercentage
Wscript.Echo "Name: " & objItem.Name
Next
Do you think you could implement this check?
Greetings,
Francesc
ServersCheck calculates the average CPU usage of all CPU's combined when running multiple CPU based systems.
But I'd like to log all the returned values in the SQL Server odbc. I see that only firts rule executed is logged into the database.
Should I see a database gegister for every rule checked?
What I want to do is get every month an average of the CPU using a SQL query.
Maybe my serverscheck is not working properly because it dowsn't insert a register every time that the rule is executed.
Greetings,
Francesc