Class Reference
IRIS for UNIX 2019.3
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [SYS] >  [WSMon] >  [Service]
Private  Storage   

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* 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 Properties Methods Queries Indices ForeignKeys Triggers
3 14


AddressingIn AddressingOut Attachments Base64LineBreaks
BodyId BodyXmlId ContentId ContentLocation
FaultAddressing FaultHeaders HeadersIn HeadersOut
ImportHandler IsMTOM Location MTOMRequired
MsgClass OutputTypeAttribute Password RMSession
ReferencesInline RequestMessageStart ResponseAttachments ResponseContentId
ResponseContentLocation SAXFlags SecurityContextToken SecurityIn
SecurityNamespace SecurityOut SessionCookie SoapFault
SoapVersion Timeout Transport Username

%AddEnvelopeNamespace %AddToSaveSet %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IsA %IsModified
%New %NormalizeObject %ObjectModified %OnCreateRMSession
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %ValidateObject ConvertParameter Decrypt
Encrypt EnumBuffer EnumDatabase EnumProcess
EnumResource EnumWriteDaemon EscapeHTML EscapeURL
EventCancel EventSubscribe FileWSDL GetBodyId
GetDashboard GetDisk GetECPAppSvr GetECPDataSvr
GetGlobal GetRoutine GetSystem HyperEventCall
HyperEventHead Include Initialize InsertHiddenField
InsertHiddenFields IsPrivate Link MakeFault
MakeFault12 MakeSecurityFault MakeStatusFault NormalizeName
OnCancelSecureConversation OnPageError OnPostHTTP OnPostHyperEvent
OnPostWebMethod OnPreHyperEvent OnPreWebMethod OnRequestMessage
OnSOAPRequest OnStartSecureConversation Page Process
ProcessBinary ProcessBody ProcessBodyNode QuoteJS
Reset ReturnFault ReturnOneWay RewriteURL
ShowError StartTimer StopTimer ThrowError
UnescapeHTML UnescapeURL WSAddSignatureConfirmation


• parameter NAMESPACE = "";
SOAP Namespace for the WebService
• parameter SERVICENAME = "CacheMonitorService";
Name of the WebService.
Namespaces of referenced classes will be used in the WSDL.


• 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
• 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

Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.