Ens.SAM.SensorSampler

class Ens.SAM.SensorSampler extends %Library.RegisteredObject

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties

property ForceSAMEnabled as %Boolean [ InitialExpression = 0 ];
The code checks if SAM recording is enabled for the Interoperability SAM
Set this to 1 to force SAM recording even if SAM recording is not enabled for the Interoperability SAM
Property methods: ForceSAMEnabledDisplayToLogical(), ForceSAMEnabledGet(), ForceSAMEnabledIsValid(), ForceSAMEnabledLogicalToDisplay(), ForceSAMEnabledNormalize(), ForceSAMEnabledSet()
property HostTypeMap as %String [ MultiDimensional ];
Map used to translate host types
Property methods: HostTypeMapDisplayToLogical(), HostTypeMapGet(), HostTypeMapIsValid(), HostTypeMapLogicalToDisplay(), HostTypeMapLogicalToOdbc(), HostTypeMapNormalize(), HostTypeMapSet()
property IncludeHostLabel as %Boolean [ InitialExpression = $$$SAMInteropIncludeHostLabelGet ];
Flag to indicate if include host name as data for Business Host label
Busines Host label is defined as $$$EnsSAMHostLabel "host"
Used in conjunction with sensorLabels that are defined in the definition.Br> Defaults to true.
Property methods: IncludeHostLabelDisplayToLogical(), IncludeHostLabelGet(), IncludeHostLabelIsValid(), IncludeHostLabelLogicalToDisplay(), IncludeHostLabelNormalize(), IncludeHostLabelSet()
property IncludeProductionLabel as %Boolean [ InitialExpression = $$$SAMInteropIncludeProdLabelGet ];
Flag to indicate if include production name as data for label 'production' Used in conjunction with sensorLabels that are defined in the definition.Br> Defaults to true
Property methods: IncludeProductionLabelDisplayToLogical(), IncludeProductionLabelGet(), IncludeProductionLabelIsValid(), IncludeProductionLabelLogicalToDisplay(), IncludeProductionLabelNormalize(), IncludeProductionLabelSet()
property RegisteredLabels as %String [ MultiDimensional ];
Array of labels that can be collected
If empty then all labels requested will be recorded
Array can be populated when initialized using the JSON definition sensors.sensorLabels array.
Property methods: RegisteredLabelsDisplayToLogical(), RegisteredLabelsGet(), RegisteredLabelsIsValid(), RegisteredLabelsLogicalToDisplay(), RegisteredLabelsLogicalToOdbc(), RegisteredLabelsNormalize(), RegisteredLabelsSet()
property SAMProductionLabel as %String [ InitialExpression = $ListBuild($$$EnsSAMProductionLabel,$Get($$$EnsRuntime("Name"))) ];
Label 'production' equal to name of current running production
Property methods: SAMProductionLabelDisplayToLogical(), SAMProductionLabelGet(), SAMProductionLabelIsValid(), SAMProductionLabelLogicalToDisplay(), SAMProductionLabelLogicalToOdbc(), SAMProductionLabelNormalize(), SAMProductionLabelSet()
property SAMSensorCalculatedReadings as %String [ MultiDimensional ];
Storage for Sensor data Calculated during one sample
Property methods: SAMSensorCalculatedReadingsDisplayToLogical(), SAMSensorCalculatedReadingsGet(), SAMSensorCalculatedReadingsIsValid(), SAMSensorCalculatedReadingsLogicalToDisplay(), SAMSensorCalculatedReadingsLogicalToOdbc(), SAMSensorCalculatedReadingsNormalize(), SAMSensorCalculatedReadingsSet()
property SAMSensorReadings as %String [ MultiDimensional ];
Storage for Sensor data during one sample
Property methods: SAMSensorReadingsDisplayToLogical(), SAMSensorReadingsGet(), SAMSensorReadingsIsValid(), SAMSensorReadingsLogicalToDisplay(), SAMSensorReadingsLogicalToOdbc(), SAMSensorReadingsNormalize(), SAMSensorReadingsSet()
property SAMSensors as %String [ MultiDimensional ];
Array of Sensor names this instance will sample Sensor names are Camel Case Sensor types: Counter, Gauge, Histogram, Summary. Which Counter types ought to calculate per sec Counter, CounterWithPerSec, Gauge, Histogram, Summary
Property methods: SAMSensorsDisplayToLogical(), SAMSensorsGet(), SAMSensorsIsValid(), SAMSensorsLogicalToDisplay(), SAMSensorsLogicalToOdbc(), SAMSensorsNormalize(), SAMSensorsSet()
property lastPerSecSensorReadings as %String [ MultiDimensional ];
Storage for last Sample data needed to calculate per second
Property methods: lastPerSecSensorReadingsDisplayToLogical(), lastPerSecSensorReadingsGet(), lastPerSecSensorReadingsIsValid(), lastPerSecSensorReadingsLogicalToDisplay(), lastPerSecSensorReadingsLogicalToOdbc(), lastPerSecSensorReadingsNormalize(), lastPerSecSensorReadingsSet()
property lastSamplePointInTime as %Numeric [ InitialExpression = $ZH ];
Internal $ZH for calculating time since last sample
Property methods: lastSamplePointInTimeDisplayToLogical(), lastSamplePointInTimeGet(), lastSamplePointInTimeIsValid(), lastSamplePointInTimeLogicalToDisplay(), lastSamplePointInTimeNormalize(), lastSamplePointInTimeSet()

Methods

private method %OnNew(ByRef pSensors) as %Status [ Language = objectscript ]
OnNew optional populate sensor names Any error thrown initializing will be suppressed inorder to return a sampler instance
method CollectOneSensorSample(pSensorName As %String, pSensorData, ByRef pLabels As %String = "") [ Language = objectscript ]
pLabels is an optional comma separate list of label=value or an array where label name is the key.
This method always add namespace as the id label.
method CompleteSensorSample(pOverrideElapsedTime As %Integer) [ Language = objectscript ]
Pass in the Elapsed Time used to calculate average per second to override elapsed time calculated since last sample.
method CurrentSampleDuration() as %Numeric [ Language = objectscript ]
This returns how many seconds since the last sample was recorded or the sampling was started if a recording has not taken place.
method RecordSensorSamples() [ Language = objectscript ]
classmethod RemoveAllRecordedSensorSample() [ Language = objectscript ]
This method can be used during development to remove all centrally recorded Interoperability Sensor data for this namespace.
This is to help where Sensor names change.
method RemoveLastRecordedSensorSample() [ Language = objectscript ]
If collecting SAM data then remove last sample. If the code using this calls might not be running when the Production is running it is is necessary to call this when exiting , for example during OnTearDown().
method SamplesCollectedForSensor(pSensorName As %String) as %Integer [ Language = objectscript ]
Number of times CollectOneSensorSample has been called for pSensorName
method SetSensors(ByRef pSensors) [ Language = objectscript ]
Takes sensors definition (either as an array or object) and populate instance data.
method StartSensorSample() [ Language = objectscript ]
Clean up last sample of data
method initSensorsFromArray(ByRef pSensors) [ Language = objectscript ]
method initSensorsFromObject(pSensors As %DynamicArray) [ Language = objectscript ]

Inherited Members

Inherited Methods (Including Private)

Feedback