Skip to main content

SYS.Monitor.SAM.Config

Class SYS.Monitor.SAM.Config Extends %Persistent

Configuration parameters for SAM (System Alerting and Monitoring).

This controls behavior of the SYS.Monitor.SAM.Sensors collector class.

Parameters

METRICGROUPS

Parameter METRICGROUPS = "Performance,Mirrors,Database,CPU,CSPGateway,Journal,License,Memory,Process,Shadows,Transactions,SharedMemory,WriteDemon,Diagnostic";

Properties

Key

Property Key As %String [ InitialExpression = "SAM" ];

ExcludeMetrics

Property ExcludeMetrics As %List;

A list of Sensor Groups to omit from each collection.

Valid values are Performance, Mirrors, Database, CPU, CSPGateway, Journal, License, Memory, Process, Shadows, Transactions, SharedMemory, WriteDemon and Diagnostic

To update: set sam=##class(SYS.Monitor.SAM.Config).Open(),sam.ExcludeMetrics=$lb("Shadows","Transactions") do sam.%Save()

ApplicationClasses

Property ApplicationClasses As array Of %String [ Internal ];

An array of Application Classes/Namespaces to include with each collection. Each class must inherit from %SYS.Monitor.SAM.Abstract and implement the GetSensors() method. Classname is used as the key, and the value may be a single Namespace or a comma-delimited list.

Methods

AddApplicationClass

ClassMethod AddApplicationClass(ClassName As %String, Namespace As %String) As %Status

Add an Application class name to be called during each SAM collection. The class must inherit from %SYS.Monitor.SAM.Abstract and implement the GetSensors() method.

Note that the 'Namespace' argument is typically a single Namespace, but may be a comma-delimited list. Calling this method for an existing ApplicationClass will replace the Namespace(s) for this Class. For multiple Namespaces, the ApplicationClass must differentiate Sensor names for each Namespace.

DeleteApplicationClass

ClassMethod DeleteApplicationClass(ClassName As %String) As %Status

Remove an Application class name from the list to be called during each SAM collection.

Open

ClassMethod Open() As SYS.Monitor.SAM.Config [ Internal ]

%OnValidateObject

Method %OnValidateObject() As %Status

ExportAPI

ClassMethod ExportAPI(errors As %String) As %Status [ Internal ]

Export all source code to enable Prometheus API on older versions Creates SAM.XML in current directory. Returns status a list of 'errors'. Use Do $System.OBJ.Load("SAM.xml","ck") to import.

CreateWebApp

ClassMethod CreateWebApp() As %Status [ Internal ]

Create /api/monitor REST API