%SYS
Service Class Reference

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

Inheritance diagram for Service:
Collaboration diagram for Service:

Public Member Functions

_.XML.DataSet EnumBuffer ()
 Enumerate stats for all buffer sizes. More...
 
_.XML.DataSet EnumDatabase ()
 Enumerate all databases for this instance. More...
 
_.XML.DataSet EnumProcess (_.Library.String sort, _.Library.Integer number)
 Enumerate the 'top' processes for this instance. More...
 
_.XML.DataSet EnumResource ()
 Enumerate stats for all system resource "seizes". More...
 
_.XML.DataSet EnumWriteDaemon ()
 Enumerate stats for all Write Daemons. More...
 
_.Library.Integer EventCancel (id)
 Cancel an Event subscription. More...
 
_.Library.String EventSubscribe (location)
 Subscribe to Events from this InterSystems IRIS instance. More...
 
SYS.Stats.Dashboard GetDashboard ()
 Fetch general system metrics and status.
 
SYS.Stats.Disk GetDisk ()
 Fetch metrics of Disk usage for globals for this instance. More...
 
SYS.Stats.ECPAppSvr GetECPAppSvr ()
 Fetch ECP Application Server metrics for this instance.
 
SYS.Stats.ECPDataSvr GetECPDataSvr ()
 Fetch ECP Database Server metrics for this instance.
 
SYS.Stats.Global GetGlobal ()
 Fetch Global metrics for this instance.
 
SYS.Stats.Routine GetRoutine ()
 Fetch Routine metrics for this instance.
 
SYS.WSMon.wsSystem GetSystem ()
 Fetch System (InterSystems IRIS instance) information.
 

Static Public Attributes

 NAMESPACE = None
 A Web Service class to support remote monitoring of a InterSystems IRIS instance. More...
 
 SERVICENAME = None
 Name of the WebService.
 
 USECLASSNAMESPACES = None
 Namespaces of referenced classes will be used in the WSDL.
 

Detailed Description

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)

Member Function Documentation

◆ EnumBuffer()

_.XML.DataSet EnumBuffer ( )

Enumerate stats for all buffer sizes.

Returned as a Data Set of SYS.Stats.Buffer.Sample() query

◆ EnumDatabase()

_.XML.DataSet EnumDatabase ( )

Enumerate all databases for this instance.

Returned as a Data Set of SYS.WSMon.wsDatabase.List() query

◆ EnumProcess()

_.XML.DataSet EnumProcess ( _.Library.String  sort,
_.Library.Integer  number 
)

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.

◆ EnumResource()

_.XML.DataSet EnumResource ( )

Enumerate stats for all system resource "seizes".

Returned as a Data Set of SYS.Stats.Resource.Sample() query

◆ EnumWriteDaemon()

_.XML.DataSet EnumWriteDaemon ( )

Enumerate stats for all Write Daemons.

Returned as a Data Set of SYS.Stats.WriteDaemon.Sample() query

◆ EventCancel()

_.Library.Integer EventCancel (   id)

Cancel an Event subscription.

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

◆ EventSubscribe()

_.Library.String EventSubscribe (   location)

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.

◆ GetDisk()

SYS.Stats.Disk GetDisk ( )

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.

Member Data Documentation

◆ NAMESPACE

NAMESPACE = None
static

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