This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ShowInternalAgentsMonitors | |
'Write the list of agents to the screen | |
For Each agent In InternalAgents.Items | |
WScript.Echo "" | |
WScript.Echo "-------------------------------------------------------------------------------" | |
WScript.Echo " AGENT: " & agent.Name | |
WScript.Echo "-------------------------------------------------------------------------------" | |
strHeader = "" | |
strRow = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function GetProcessMonitors(aObjHttp, oNames, aObjAgent, aShowProcesses) | |
url = "http://www.monitis.com/api?version=2&apikey=" & apikey & "&output=xml&action=topProcessByCPUUsage&limit=50&detailedResults=true" | |
aObjHttp.open "GET", url, False | |
aObjHttp.send | |
Set oRes = CreateObject("Microsoft.XMLDOM") | |
oRes.async = False | |
oRes.LoadXML(aObjHttp.responseText) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function GetGlobalMonitors(aObjHttp, oNames, aObjAgent, aShowMonitors) | |
Dim oName | |
For Each oName in oNames | |
If oName.NodeName <> "#text" And oName.NodeName <> "process" And _ | |
SupportedMonitors.Exists(LCase(oName.NodeName)) And _ | |
aShowMonitors.Exists(LCase(oName.NodeName)) Then | |
' Create new monitor object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function GetInternalAgents(aObjHttp, aObjAgents, aShowMonitors, aShowProcesses) | |
Dim objAgents, xmlAgents | |
Set objAgents = CreateObject("Scripting.Dictionary") | |
'Retrieve the list of agents | |
url = "http://www.monitis.com/api?action=agents&apikey=" + apiKey + "&output=xml" | |
aObjHttp.open "GET", url, False | |
aObjHttp.send | |
'Parse response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class class_Metric | |
Public Name | |
Public Metric | |
Public Result | |
Public Suffix | |
Public Width | |
Private Sub Class_Initialize | |
Name = "" | |
Metric = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Include(strFilename) | |
On Error Resume Next | |
Dim oFSO, f, s | |
Set oFSO = CreateObject("Scripting.FileSystemObject") | |
If oFSO.FileExists(strFilename) Then | |
Set f = oFSO.OpenTextFile(strFilename) | |
s = f.ReadAll | |
f.Close | |
ExecuteGlobal s |
NewerOlder