Skip to main content

%SYS.Monitor.AbstractSensor

abstract class %SYS.Monitor.AbstractSensor extends %Library.RegisteredObject

Abstract class for a Sensor

User classes inherit from this class to become a Sensor for System Monitor.

Property Inventory

Method Inventory

Properties

property Notifications [ MultiDimensional ];
Property methods: NotificationsDisplayToLogical(), NotificationsGet(), NotificationsIsValid(), NotificationsLogicalToDisplay(), NotificationsLogicalToOdbc(), NotificationsNormalize(), NotificationsSet()
property State as %String [ InitialExpression = " " ];
Runtime state
Property methods: StateDisplayToLogical(), StateGet(), StateIsValid(), StateLogicalToDisplay(), StateLogicalToOdbc(), StateNormalize(), StateSet()

Methods

final method ClearNotifications() as %Integer
USER DOES NOT IMPLEMENT THIS METHOD This method is called to clear notifications for the SYS.Monitor Controller
final method ClearSensors() as %Integer
USER DOES NOT IMPLEMENT THIS METHOD The controller calls this to initialize the SensorReadings array.
abstract method GetSensors() as %Status
USER MUST IMPLEMENT THIS METHOD

The System Monitor Controller calls this method to get sensor readings. It is called every 10 seconds by default.

Users may return readings for multiple sensors (but only one reading per sensor on each call). User calls SetSensor(sensorname, value[,type]) for every sensor reading. The sensors are kept in the property SensorReading(sensor)=value, and SensorType(sensor)=type. The controller picks up the sensors and their values after the return from GetSensors().

A return code of $$$OK indicates there were no errors. A return code of 0 indicates a failure.

final method LogCon(Msg As %String = "", Severity As %Integer = 0) as %Status
USER DOES NOT IMPLEMENT THIS METHOD

User may call this method to post alerts directly to the messages.log file.

final method LogMsg(msg As %String = "") as %Status
USER DOES NOT IMPLEMENT THIS METHOD

User may call this method to log information to the SystemMonitor.log file in the mgr directory.

final method Notify(Sensor As %String, Severity As %Integer, Msg As %String) as %Integer
USER DOES NOT IMPLEMENT THIS METHOD This method is called to post a notification
final method OpenLog() as %Status
USER DOES NOT IMPLEMENT THIS METHOD

method SetSensor(Sensor As %String, Value As %String, Qualifier As %String = "") as %Integer
USER DOES NOT IMPLEMENT THIS METHOD The user must call this method to set a sensor reading. Readings are picked up by the controller after GetSensors() returns.

method Start() as %Status
USER MAY IMPLEMENT THIS METHOD

The System Monitor Controller calls this method once when it starts. The user may initialize the properties, counters, etc.

A return code of $$$OK indicates there were no errors. A return code of 0 indicates a failure.

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab