Skip to main content

%SYS.Monitor.Sensor

persistent class %SYS.Monitor.Sensor extends %Library.Persistent

SQL Table Name: %SYS_Monitor.Sensor

The persistent definition of a System Monitor Dashboard Sensor. This also includes the history of all Sensor Readings.

Property Inventory

Method Inventory

Properties

property Alert as %String;
Boolean flag ("0" or "1") to indicate if System Monitor generates an alert on CriticalValue
Property methods: AlertDisplayToLogical(), AlertGet(), AlertGetStored(), AlertIsValid(), AlertLogicalToDisplay(), AlertLogicalToOdbc(), AlertNormalize(), AlertSet()
property CriticalValue as %String;
Value used to check for critical/alert status
Property methods: CriticalValueDisplayToLogical(), CriticalValueGet(), CriticalValueGetStored(), CriticalValueIsValid(), CriticalValueLogicalToDisplay(), CriticalValueLogicalToOdbc(), CriticalValueNormalize(), CriticalValueSet()
property Description as %String (MAXLEN = 200);
Text description of the Sensor for documentation.
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property Item as %String (MAXLEN = 500) [ InitialExpression = "-" , Required ];
Some sensors may define multiple values or 'subitems', such disk space for a specific database. If the sensor is only a single value, then this property contains a "-" to identify as a single or base level sensor.
Property methods: ItemDisplayToLogical(), ItemGet(), ItemGetStored(), ItemIsValid(), ItemLogicalToDisplay(), ItemLogicalToOdbc(), ItemNormalize(), ItemSet()
property Name as %String (MAXLEN = 100) [ Required ];
Name of the Sensor
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property Operator as %String [ InitialExpression = ">" ];
Logical operator used to compare Warning/Critial values. Default is ">", with option of "<".
Property methods: OperatorDisplayToLogical(), OperatorGet(), OperatorGetStored(), OperatorIsValid(), OperatorLogicalToDisplay(), OperatorLogicalToOdbc(), OperatorNormalize(), OperatorSet()
property ReadingInterval as %String;
Number of seconds between each reading This value is inherited by %SYS.Monitor.Control in all cases, but could be extended so sensors have induvidual reading delays
Property methods: ReadingIntervalDisplayToLogical(), ReadingIntervalGet(), ReadingIntervalGetStored(), ReadingIntervalIsValid(), ReadingIntervalLogicalToDisplay(), ReadingIntervalLogicalToOdbc(), ReadingIntervalNormalize(), ReadingIntervalSet()
relationship Readings as array of %SYS.Monitor.Reading [ InitialExpression = $listbuild("%SYS.Monitor.Reading","Sensor",+$this,"children",1,1) , Transient , Inverse = Sensor , Cardinality = children ];
Property methods: ReadingsGet(), ReadingsGetObject(), ReadingsGetObjectId(), ReadingsGetSwizzled(), ReadingsIsEmpty(), ReadingsIsValid(), ReadingsNewObject(), ReadingsRClose(), ReadingsRExec(), ReadingsRFetch(), ReadingsRelate(), ReadingsSQLCompute(), ReadingsSet(), ReadingsUnRelate()
property Units as %String;
Description of units used, for display and documentation only.
Property methods: UnitsDisplayToLogical(), UnitsGet(), UnitsGetStored(), UnitsIsValid(), UnitsLogicalToDisplay(), UnitsLogicalToOdbc(), UnitsNormalize(), UnitsSet()
property WarningValue as %String;
Value used to check for warning status. Note that if WarningValue, CriticalValue, and AlertFlag are null for a specific Sensor.Item, then that Item will use the values of the base ("-") Sensor.
Property methods: WarningValueDisplayToLogical(), WarningValueGet(), WarningValueGetStored(), WarningValueIsValid(), WarningValueLogicalToDisplay(), WarningValueLogicalToOdbc(), WarningValueNormalize(), WarningValueSet()

Methods

classmethod AllDashboardSensorsClose(ByRef qHandle As %Binary) as %Status
classmethod AllDashboardSensorsExecute(ByRef qHandle As %Binary) as %Status
classmethod AllDashboardSensorsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod DeleteByClass(ClassName As %String) as %Status
Delete all Sensor and Readings associated with a ClassName (i.e. "Owner")
classmethod Open(Sensor As %String, Item As %String = "", ByRef Status As %Status) as Sensor
Open an exisiting Sensor for editing Critical and Warning Values or other properties. 'Item' may be "" to open a top level Sensor. Setting Critical/Warning Values for a specific Item will override the Values from the top level.

Note that internal properties for 'Owner' and 'Function' should not be modified by users.

Queries

query AllDashboardSensors()
Selects Name As %String, Item As %String, CriticalValue As %String, WarningValue As %String, Alert As %String, Operator As %String, Units As %String, Description As %String, ReadingInterval As %String, Namespace As %String
Loop through all registered Namespaces and return all registered Dashboard Sensors. If a Sensor has specific Items, do not include the top-level Sensor definition.
query SensorIDs()
SQL Query:
SELECT ID FROM Sensor WHERE Sensor.Item = '-'
A list of all top level Sensor IDs
query SensorItems(Name As %String)
SQL Query:
SELECT Item FROM Sensor WHERE Sensor.Name = :Name AND Sensor.Item != '-'
A list of all Sensor.Items for a given Sensor
query SensorNames()
SQL Query:
SELECT Name FROM Sensor WHERE Sensor.Item = '-'
A list of all top level Sensor Names

Indexes

index (SensorIndex on Name,Item) [IdKey, Type = key, Unique];
Index methods: SensorIndexCheck(), SensorIndexDelete(), SensorIndexExists(), SensorIndexOpen(), SensorIndexSQLCheckUnique(), SensorIndexSQLExists(), SensorIndexSQLFindPKeyByConstraint(), SensorIndexSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (%SYS.Monitor.Sensor)

^ISC.Monitor.SensorD(ID)
=
%%CLASSNAME
Description
WarningValue
CriticalValue
Alert
Operator
Units
Owner
Function
ReadingInterval
FeedbackOpens in a new tab