Skip to main content

SYS.WSMon.Service

class SYS.WSMon.Service extends %SOAP.WebService

A Web Service class to support remote monitoring of a InterSystems IRIS instance.

Each of the following Web Methods may be called to gather information about a InterSystems IRIS instance. See the SYS.WSMon.ws* or the SYS.Stats.* classes for details about the classes and properties which can be accessed.

The services are generally in 3 categories. There are "Get" services which return single instances of classes and their propeties, e.g. GetSystem(). There are "Enum" services which enumerate multiple instances and return %XML.DataSet collections, e.g. EnumDatabase(). And there are EventSubscribe() and EventCancel() methods, which let you register your own version of a CacheEventSink() Web method to receive and process alerts. See the SYS.WSMon.EventSink class for an example and more details on Events.

The class SYS.WSMon.Client provides client methods to call these services from InterSystems IRIS. For example:
  s server="myserver:57772" s client=##class(SYS.WSMon.Client).%New()
  s client.Location="http://"_server_"/csp/sys/SYS.WSMon.Service.cls"
  s client.Timeout=10 s sysref=client.GetSystem()
  w !,"InterSystems IRIS instance ",sysref.Name," has ",sysref.CurrentUsers," current users."
  

NOTE: Executing the Web Services requires READ access to the %DB_IRISSYS resource. If the InterSystems IRIS instance which provides the Web Services has security enabled, then you need to grant this access for the CSP processes which execute the Web Services. This can be done in the configuration in a few different ways, e.g. modifying the CSP application. Or, you can add a username/password token (for a user with the appropriate role) to the client request:
  s usertoken=##class(%SOAP.Security.UsernameToken).Create("wsmon","wsmon")
  d client.SecurityOut.AddToken(usertoken)
  

Method Inventory

Parameters

parameter NAMESPACE = http://www.intersystems.com/cache/wsmon/1;
SOAP Namespace for the WebService
parameter SERVICENAME = CacheMonitorService;
Name of the WebService.
parameter USECLASSNAMESPACES = 1;
Namespaces of referenced classes will be used in the WSDL.

Methods

method EnumBuffer() as %XML.DataSet [ WebMethod ]
Enumerate stats for all buffer sizes Returned as a Data Set of SYS.Stats.Buffer.Sample() query
method EnumDatabase() as %XML.DataSet [ WebMethod ]
Enumerate all databases for this instance Returned as a Data Set of SYS.WSMon.wsDatabase.List() query
method EnumProcess(sort As %String, number As %Integer) as %XML.DataSet [ WebMethod ]
Enumerate the 'top' processes for this instance. Returned as a Data Set of SYS.WSMon.wsProcess.List() query.

'sort' may be either "COMMANDS" (default) or "GLOREFS"
'number' specifies the count of processes to return (default is 10)

See the List() query documentation for details about the 'top' process list.
method EnumResource() as %XML.DataSet [ WebMethod ]
Enumerate stats for all system resource "seizes" Returned as a Data Set of SYS.Stats.Resource.Sample() query
method EnumWriteDaemon() as %XML.DataSet [ WebMethod ]
Enumerate stats for all Write Daemons Returned as a Data Set of SYS.Stats.WriteDaemon.Sample() query
method EventCancel(id) as %Integer [ WebMethod ]
Cancel an Event subscription Return the ID string from the Event Subscription to cancel the subscription
method EventSubscribe(location) as %String [ WebMethod ]
Subscribe to Events from this InterSystems IRIS instance Register a CacheEventSink Web service to receive Events. The Web Service must follow the example and WSDL of the SYS.WSMon.EventSink.CacheEventSink() Web method.

'location' is the Web service URL for invoking the EventSink method including the system, port, CSP application, and Web service name: e.g. "http://localhost:57773/csp/sys/SYS.WSMon.EventSink.cls"

InterSystems IRIS will attempt to call this Web Service for each "event" with a wsEvent instance. The return value is an ID string that can be used to cancel the subscription.
method GetDashboard() as SYS.Stats.Dashboard [ WebMethod ]
Fetch general system metrics and status
deprecated method GetDisk() as SYS.Stats.Disk [ WebMethod ]
Fetch metrics of Disk usage for globals for this instance DEPRECATED: the system no longer captures the statistics that this class represents. All values will report zero.
method GetECPAppSvr() as SYS.Stats.ECPAppSvr [ WebMethod ]
Fetch ECP Application Server metrics for this instance
method GetECPDataSvr() as SYS.Stats.ECPDataSvr [ WebMethod ]
Fetch ECP Database Server metrics for this instance
method GetGlobal() as SYS.Stats.Global [ WebMethod ]
Fetch Global metrics for this instance
method GetRoutine() as SYS.Stats.Routine [ WebMethod ]
Fetch Routine metrics for this instance
method GetSystem() as SYS.WSMon.wsSystem [ WebMethod ]
Fetch System (InterSystems IRIS instance) information

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab