Skip to content

Instantly share code, notes, and snippets.

@abarnas
Created October 12, 2011 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abarnas/1282602 to your computer and use it in GitHub Desktop.
Save abarnas/1282602 to your computer and use it in GitHub Desktop.
Monitis Top Show agent monitors
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 = ""
For Each monitor In agent.MonitorList.Items
For Each objMetric In Monitor.MetricList.Items
strHeader = strHeader & format(objMetric.Name, objMetric.Width)
strRow = strRow & format(objMetric.Result & objMetric.Suffix,
objMetric.Width)
Next
Next
WScript.Echo strHeader
WScript.Echo strRow
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment