Ens.Util.Statistics

class Ens.Util.Statistics extends %Library.RegisteredObject

Container the queries used by Ensemble statistics page. Also contains methods to record activity statistics for given dimensions.

Method Inventory

Methods

classmethod DisableSAMForNamespace(Output pPrevious As %Boolean) as %Status [ Language = objectscript ]
This method disables recording of metrics for SAM
classmethod DisableSAMIncludeHostLabel(Output pPrevious As %Boolean) as %Status [ Language = objectscript ]
This method disallows the inclusion of the Production name as a label in the recording of metrics for SAM
classmethod DisableSAMIncludeProdLabel(Output pPrevious As %Boolean) as %Status [ Language = objectscript ]
This method disallows the inclusion of the Production name as a label in the recording of metrics for SAM
classmethod DisableStatsForConfig(pConfigName As Ens.DataType.ConfigName = "", Output pPrevious As %Boolean) as %Status [ Language = objectscript ]
This method disable statistics recording for the configuration item passed in.
The code within the method is subject to change.
classmethod DisableStatsForProduction(pProduction As %String = "", Output pPrevious As %Boolean) as %Status [ Language = objectscript ]
This method disables statistics recording for all items running in a production in this namespace.
The first parameter is included to allow for future use.
The code within the method is subject to change.
classmethod EnableSAMForNamespace(Output pPrevious As %Boolean, pOn As %Boolean = 1) as %Status [ Language = objectscript ]
This method enables recording of metrics for SAM
The default is off
classmethod EnableSAMIncludeHostLabel(Output pPrevious As %Boolean, pOn As %Boolean = 1) as %Status [ Language = objectscript ]
This method allows the inclusion of the host label in the recording of metrics for SAM
The default is to include
classmethod EnableSAMIncludeProdLabel(Output pPrevious As %Boolean, pOn As %Boolean = 1) as %Status [ Language = objectscript ]
This method allows the inclusion of the Production name as a label in the recording of metrics for SAM
The default is to include
classmethod EnableStatsForConfig(pConfigName As Ens.DataType.ConfigName = "", Output pPrevious As %Boolean, pOn As %Boolean = 1) as %Status [ Language = objectscript ]
This method enables or disables statistics recording for the configuration item passed in.
The second parameter returned is the value of the setting prior to the change.
The third parameter specifies if enabled or disabled. The default is enabled.
The code within the method is subject to change.
classmethod EnableStatsForProduction(pProduction As %String = "", Output pPrevious As %Boolean, pOn As %Boolean = 1) as %Status [ Language = objectscript ]
This method enables statistics recording for all items running in a production in this namespace.
The first parameter is included to allow for future use.
The second parameter returned is the value of the setting prior to the change.
The third parameter specifies if enabled or disabled. The default is enabled.
The code within the method is subject to change.
classmethod EnumerateCountersClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateCountersExecute(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateCountersFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod EnumerateHostStatusClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateHostStatusExecute(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateHostStatusFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod EnumerateJobStatusClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateJobStatusExecute(ByRef qHandle As %Binary, pHostName As %String = "") as %Status [ Language = objectscript ]
classmethod EnumerateJobStatusFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod EnumerateMetricPropsClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateMetricPropsExecute(ByRef qHandle As %Binary, pName As %String = "") as %Status [ Language = objectscript ]
classmethod EnumerateMetricPropsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod EnumerateMetricsClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateMetricsExecute(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateMetricsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod GetCounterValues(pHost As %String, ByRef pValues As %Integer, pCount As %Integer, pIntervalSize As %Integer, pSumOnly As %Boolean = 0) as %Integer [ Language = objectscript ]
For a host pHost, return an array of count counter values in pValues subscripted by slot number. The final slot is the most recent values.
pCount is the number of values (intervals) to return. pIntervalSize is the size, in seconds of each slot (this should be a multiple of 10 and not greater than 3600).
If pSumOnly is true, then do not fill in pValues.
Returns the total number in all the slots.
classmethod GetSAMSensorSampler(pDefinitionClassname As %String, pDefinitionXDataName As %String, Output pIsSAMSamplingEnabled As %Boolean = 0, Output pSC As %Status = $$$OK) as Ens.SAM.SensorSampler [ Language = objectscript ]
Return a SAM Sensor Sampler instantiated object based on a definition in XData
Initialize using data from JSON definition in XDataName of pDefinitionClassname
classmethod GetStatsUserDimension(pConfigName As %String = "", pConfigType As %Integer = 0) as %String [ Language = objectscript ]
This returns the User Dimension from the in memory array.
classmethod GetTempStatsDaystoKeep() as %Integer [ Language = objectscript ]
This method returns the maximum days to keep the statistics in temporary storage.
If statistics are not moved from temporary to permanent storage this is a safety
measure to prevent the temporary data growing.
This method returns the interval recording time.
The default if not set is 31 days.
classmethod InitStats(pConfigName As %String = "", pOverrideConfigSetting As %Boolean = 0) as %Boolean [ Language = objectscript ]
Used to check if statistics ought to be collected and initializes if needed.
The code within the method is subject to change.
classmethod InstantiateSensorSampler(pSensorDefinition As %DynamicObject, Output pIsSAMSamplingEnabled As %Boolean = 0, ByRef pSC As %Status) as Ens.SAM.SensorSampler [ Language = objectscript ]
Return a SAM Sensor Sampler instantiated object based on a definition in dynamic object
classmethod PurgeUncollectedStats(pDaysToKeep As %Integer = -1, Output pEntriesDeleted As %Integer = 0) as %Status [ Language = objectscript ]
Counters and Duration are stored in a pure global structure before being moved for analysis.
This method is to be used if necessary to remove this data. It will not be available for analysis after.
classmethod RecordStats(pConfigType As %Integer = 0, pConfigName As %String = "", pUserDimension As %String = "", pCleanupAfter As %Boolean = 1, pCount As %Integer = 1, pDuration As %Numeric) [ Language = objectscript ]
This method will record the count and duration statistics to the temporary global.
Passing in pCount will override default count of 1.
Passing in pDuration will override calculated duration and override checking if stats have been started.
Negative Duration (calculated or passed in) is not used.
classmethod ReportItemsEnabledForStats(ByRef pItems, Output pAllItems As %Boolean = 0) as %Status [ Language = objectscript ]
This method reports which items are enabled for statistics gathering.
The parameter is passed back an array if there are any items enabled/disabled individually.
The second parameter AllItems will indicate if all items are enabled.
classmethod SetStatsCounterInterval(pInterval As %Integer = 10) as %Integer [ Language = objectscript ]
This method set the default interval recording time in seconds.
The minimum is 1 second.
It returns the interval used.
classmethod SetStatsUserDimension(pConfigName As %String = "", pUserDimension As %String = $$$StatsDefaultDimension) [ Language = objectscript ]
This sets the User Dimension in the in memory array.
classmethod SetTempStatsDaystoKeep(pDaysToKeep As %Integer = 31) as %Integer [ Language = objectscript ]
This method set the maximum days to keep the statistics in temporary storage.
The minimum is 1 day. Default is 31 days.
It returns the interval used.
classmethod StatsActive(pConfigName As %String = "") as %Boolean [ Language = objectscript ]
Used to check if statistics are to be gathered.
The code within the method is subject to change.
classmethod StatsCounterInterval() as %Integer [ Language = objectscript ]
This method returns the interval recording time.
classmethod StatsStarted(pConfigName As %String = "") as %Integer [ Language = objectscript ]
This method tests if statistics gathering has started.

Queries

query EnumerateCounters()
Selects Category As %String, Item As %String, Count As %Integer
Returns a set of pre-defined counters
query EnumerateHostStatus()
Selects Name As %String, Type As %String, Status As %String, AdapterState As %String, LastActivity As %TimeStamp, ElapsedTime As %Integer, Queue As %Integer, Count As %Integer
Returns status for a set of hosts
Name is the name of the host item.
Type is the type (Service, Operation, etc.) of the host item.
Status is last reported status for the item.
AdapterState is connected status of jobs for this host.
LastActivity is local time of last activity on this host.
ElapsedTime is number of seconds from time of last activity on this host to now.
Queue is the current number of items in the queue associated with this item.
Count is the number of activities processed since it was started.
query EnumerateJobStatus(pHostName As %String)
Selects Name As %String, Job As %String, Status As %String, AdapterState As %String, LastActivity As %TimeStamp, Count As %Integer, Method As %String, Retry As %Integer, ActiveMessage As %String
Returns job status for a specific host
query EnumerateMetricProps(pName As %String = "")
Selects Instance As %String, Property As %String, Value As %String, History As %String
Returns values within a specific BusinessMetric cache
query EnumerateMetrics()
Selects Name As %String, LastUpdate As %TimeStamp, IsRunning As %Boolean
Returns contents of BusinessMetric cache

Inherited Members

Inherited Methods

Feedback