Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%SYS] >  [Monitor] >  [AbstractSensor]
Private  Storage   

abstract class %SYS.Monitor.AbstractSensor extends %RegisteredObject

Abstract class for a Sensor

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

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 9


Summary

Properties
Notifications State

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
ClearNotifications ClearSensors GetSensors LogCon
LogMsg Notify OpenLog SetSensor
Start

Subclasses
%SYS.Monitor.AbstractDashboard

Properties

• property Notifications  [ MultiDimensional ];
• property State as %String [ InitialExpression = " " ];
Runtime state

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.



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