Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [Ens] >  [BusinessMetric]
Private  Storage   

class Ens.BusinessMetric extends Ens.BusinessService

Metric Service
Updates a defined set of Business Metrics.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 5 19


Summary

This is a Business Service class.

The associated Adapter class is Ens.InboundAdapter.

Properties
%AlertStartTime %ConfigName %ConfigQueueName
%LastActionTime %LastHandledTime %LastReportedError
%OutsideCreated %PreserveSession %ProcessInputCalled
%QuitTask %RequestHeader %SessionId
%SuperSession %SuperSessionCreatedBeforeSession %WaitForNextCallInterval
%WarnedLatest %isShadow %rangeLower
%rangeUpper %thresholdLower %thresholdUpper
Adapter AlertGracePeriod AlertGroups
AlertOnError ArchiveIO BusinessPartner
GenerateSuperSessionID IOLogEntry InactivityTimeout
ThrottleDelay

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnClose %OnDashboardAction
%OnGetActionList %OnNew %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %SuperSessionSet
%ValidateObject AdapterName AssignOneSetting CalculateMetricsOnDemand
CloseIOLogEntry EnumerateSettingsClose EnumerateSettingsExecute EnumerateSettingsFetch
ForceSessionId GenerateSuperSession GetDeferredResponseToken GetMetric
GetProductionSettingValue GetProductionSettings GetPropertyConnections GetSettings
GetShadowInstance NewIOLogEntry OnCalculateMetrics OnError
OnGenerateSuperSession OnGetConnections OnGetInstances OnInit
OnKeepalive OnMonitor OnProcessInput OnProductionStart
OnProductionStop OnStart OnStop OnTearDown
PopulateSuperSession QueueName SaveIOLogEntry SendAlert
SendDeferredResponse SendRequestAsync SendRequestSync SetMetric


Parameters

• parameter ADAPTER = "Ens.InboundAdapter";
Use an adapter to make sure we get invoked.

Properties

• property %rangeLower as Ens.DataType.Metric;
Set this property in OnCalculateMetrics in order to provide a default rangeLower value for any dashboard meters connected to this property.
• property %rangeUpper as Ens.DataType.Metric;
Set this property in OnCalculateMetrics in order to provide a default rangeUpper value for any dashboard meters connected to this property.
• property %thresholdLower as Ens.DataType.Metric;
Set this property in OnCalculateMetrics in order to provide a default thresholdLower value for any dashboard meters connected to this property.
• property %thresholdUpper as Ens.DataType.Metric;
Set this property in OnCalculateMetrics in order to provide a default thresholdUpper value for any dashboard meters connected to this property.

Methods

• classmethod %OnDashboardAction(pAction As %String, pContext As %ZEN.proxyObject, pConfigName As %String) as %Status
This callback is invoked from a dashboard when an action defined by this metric is invoked.
pAction is the logical name of the action.
pContext is a proxy object that contains various information about the action and provides a way for the method to return information to the client. Refer to DeepSee KPIs for more information.
• classmethod %OnGetActionList(ByRef pActions As %List, pConfigName As %String) as %Status
Callback to get a list of dashboard actions for this Business Metric. Items returned by this method are available as actions in the Dashboard editor. This takes the form:
pActions($I(pActions))=$LB(name,caption)
Refer to DeepSee KPIs for more information.
• classmethod CalculateMetricsOnDemand(pConfigItemName As %String, pInstances As %String = "") as %Status
Use this ClassMethod to calculate business metrics on demand instead of on a refresh interval. You must specify a Config Item name and a Metric Instance name or comma-separated list of Instance names to calculate. If you do not specify any Instances, all Instances you have defined in the MetricInstances query for your Metrics class will be calculated. To use this method, your production should be running and should contain a Config Item for the metric with the Config Item name you specify and with its PoolSize = 0.
• final classmethod GetMetric(pMetric As %String, pProperty As %String, pSubNode As %String = "", pInstance As %String = 1) as %String
Public API to directly get the value of a metric.
pMetric is the configuration name of the Business Metric class.
pProperty is the name of the metric property.
pSubNode (optional) is subscript to use for multidimensional properties.
pInstance (optional) is the metric instance value (use 1).
Returns the value for the metric (for multidimensional metrics, value at top or subnode is returned).
• method OnCalculateMetrics() as %Status
Calculate and update the set of metrics for this class This is overwritten by subclasses
• abstract classmethod OnGetInstances(ByRef pInstSet As %String) as %Status
This user callback method can be defined within a subclass in order to provide a set of instances for this Business Metric. In this case, metrics will be calculated for every instance (that is, OnCalculateMetric, will be called for every instance).
The set of instances is returned via the pInstSet array which is of the form:
pInstSet(n) = InstanceName
To provide a data-driven set of metric instances, you can also define a class query called MetricInstances; The first column returned by this query is the instance name.
If both the query and this method are defined, the query is called first and the results are passed to this method.
• method OnInit() as %Status
This user callback method is called via initConfig() from %OnNew() or in the case of SOAP Services from OnPreSOAP()
• method OnProcessInput(pInput As %RegisteredObject, Output pOutput As %RegisteredObject) as %Status
Override this method to process incoming data. Do not call SendRequestSync/Async() from outside this method (e.g. in a SOAP Service or a CSP page).
• classmethod OnProductionStart(pConfigName As %String) as %Status
This user callback method is called when the system is being started
• classmethod OnProductionStop(pConfigName As %String) as %Status
This user callback method is called when the system is being stopped
• classmethod OnStart(pConfigName As %String) as %Status
• classmethod OnStop(pConfigName As %String) as %Status
• method OnTearDown() as %Status
This user callback method is called from %OnClose()
• final classmethod SetMetric(pMetric As %String, pProperty As %String, pValue As %String, pInstance As %String = 1) as %Status
Public API to directly set the value of a metric.
pMetric is the configuration name of the Business Metric class.
pProperty is the name of the metric property.
pValue is the new value for the metric. You can pass an array by reference if you wish to set a multidimensional metric.
pInstance (optional) is the metric instance value (use 1).


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