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)
SOAP Namespace for the WebService
Name of the WebService.
Namespaces of referenced classes will be used in the WSDL.
Enumerate stats for all buffer sizes Returned as a Data Set of SYS.Stats.Buffer.Sample() query
Enumerate all databases for this instance Returned as a Data Set of SYS.WSMon.wsDatabase.List() query
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.
Enumerate stats for all system resource "seizes" Returned as a Data Set of SYS.Stats.Resource.Sample() query
Enumerate stats for all Write Daemons Returned as a Data Set of SYS.Stats.WriteDaemon.Sample() query
Cancel an Event subscription Return the ID string from the Event Subscription to cancel the subscription
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.
Fetch general system metrics and status
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.
Fetch ECP Application Server metrics for this instance
Fetch ECP Database Server metrics for this instance
Fetch Global metrics for this instance
Fetch Routine metrics for this instance
Fetch System (InterSystems IRIS instance) information