Skip to main content

SYS.WSMon.Service

Class SYS.WSMon.Service Extends %SOAP.WebService [ System = 4 ]

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)

Parameters

SERVICENAME

Parameter SERVICENAME = "CacheMonitorService";

Name of the WebService.

NAMESPACE

Parameter NAMESPACE = "http://www.intersystems.com/cache/wsmon/1";

SOAP Namespace for the WebService

USECLASSNAMESPACES

Parameter USECLASSNAMESPACES = 1;

Namespaces of referenced classes will be used in the WSDL.

Methods

GetSystem

Method GetSystem() As SYS.WSMon.wsSystem [ WebMethod ]

Fetch System (InterSystems IRIS instance) information

GetDashboard

Method GetDashboard() As SYS.Stats.Dashboard [ WebMethod ]

Fetch general system metrics and status

GetGlobal

Method GetGlobal() As SYS.Stats.Global [ WebMethod ]

Fetch Global metrics for this instance

GetDisk

Method GetDisk() As SYS.Stats.Disk [ Deprecated, 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.

GetRoutine

Method GetRoutine() As SYS.Stats.Routine [ WebMethod ]

Fetch Routine metrics for this instance

GetECPAppSvr

Method GetECPAppSvr() As SYS.Stats.ECPAppSvr [ WebMethod ]

Fetch ECP Application Server metrics for this instance

GetECPDataSvr

Method GetECPDataSvr() As SYS.Stats.ECPDataSvr [ WebMethod ]

Fetch ECP Database Server metrics for this instance

EnumDatabase

Method EnumDatabase() As %XML.DataSet [ WebMethod ]

Enumerate all databases for this instance Returned as a Data Set of SYS.WSMon.wsDatabase.List() query

EnumProcess

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.

EnumWriteDaemon

Method EnumWriteDaemon() As %XML.DataSet [ WebMethod ]

Enumerate stats for all Write Daemons Returned as a Data Set of SYS.Stats.WriteDaemon.Sample() query

EnumBuffer

Method EnumBuffer() As %XML.DataSet [ WebMethod ]

Enumerate stats for all buffer sizes Returned as a Data Set of SYS.Stats.Buffer.Sample() query

EnumResource

Method EnumResource() As %XML.DataSet [ WebMethod ]

Enumerate stats for all system resource "seizes" Returned as a Data Set of SYS.Stats.Resource.Sample() query

EventSubscribe

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.

EventCancel

Method EventCancel(id) As %Integer [ WebMethod ]

Cancel an Event subscription Return the ID string from the Event Subscription to cancel the subscription