Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / %SYS namespace / %Monitor.Manager
Private  Storage   

%Monitor.Manager


class %Monitor.Manager extends
%RegisteredObject, %XML.Adaptor

Provides system management functions for the MONITOR and Application Monitor

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
40


Summary


Methods
%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject %XMLGenerate Activate AlertClear
AlertLevel AlertTest AppDebug AppEmailSender
AppEnableEmail AppInterval AppNotify AppNotifyMethod
AppRecipients AppSmtpPassword AppSmtpServer AppSmtpUserName
ClassInterval ClearSystemCounters Deactivate EmailSender
EnableEmail Halt HaltApp Interval
IsActive Purge Recipients Refresh
RefreshApp Register Remove SignalApp
SmtpPassword SmtpServer SmtpServerPort SmtpServerSSL
SmtpUserName Start StartApp StartSystemCounters
StopSystemCounters SystemCountersActive XMLAfterExport XMLBeforeExport
XMLDTD XMLExport XMLExportInternal XMLExportToStream
XMLExportToString XMLGetSchemaImports XMLImport XMLImportInternal
XMLIsObjectEmpty XMLNew XMLSchema XMLSchemaNamespace
XMLSchemaType


Methods


• classmethod Activate(mclass As %String) as %Integer
Activate a metrics class
• classmethod AlertClear(name As %String) as %Status
Signal AppMonSensor to clear the 'Notified' flag for a NotifyOnce Alert.
• classmethod AlertLevel(level As %Integer) as %Integer
Set alert level
• classmethod AlertTest(name As %String, values As %List) as %Status
Test method for custom handling Application Monitor Alerts
• classmethod AppDebug(ByRef Enable As %Boolean, ClassName As %String, ByRef Errors As %String) as %Status
Save latest errors generated by executing an Application Monitor user-defined classe. This would include errors from methods such as %Save(), Initialize() or GetSample(). A common example of this is trying to %Save a sample with a %String property longer than 50 characters. Since these errors can happen everytime we fetch a sample, we don't really want to fill a logfile here. So we just save the latest error for each class/method.

'Enable' may be 1 or 0 to enable/disable debugging. Enable=0 disables debugging for all classes and clears the error list. No value leaves the setting as is, and it returns the current setting.
'ClassName' can specify a Class to debug (if Enable=1) or select Errors for a Class. No value means all Application Monitor classes.
'Errors' returns an array of strings for the latest errors: Errors(Class,Method)=error_string
• classmethod AppEmailSender(sender As %String) as %String
Set email sender
• classmethod AppEnableEmail(enable As %Boolean) as %Boolean
Email enabled
• classmethod AppInterval(interval As %Integer) as %String
Set application sampling interval
• classmethod AppNotify(method As %Integer) as %Integer
Set application default notification scheme
• classmethod AppNotifyMethod(ByRef method As %String, ByRef class As %String) as %Integer
Set application default notification method
• classmethod AppRecipients(recipients As %List) as %List
Set email recipients
• classmethod AppSmtpPassword(passwd As %String) as %String
Set email SMTP password
• classmethod AppSmtpServer(Server As %String, ByRef Port As %String, ByRef SSLConfiguration As %String, ByRef UseSTARTTLS As %Boolean) as %String
Set Application email SMTP Server name. Returns current Server Name ('server' is optional)
Optionally, you may also set/get the Port, SSLConfiguration, and UseSTARTTLS properties.
See the %Net.SMTP class for descriptions and defaults of these properties.
• classmethod AppSmtpUserName(name As %String) as %String
Set email SMTP user name
• classmethod ClassInterval(mclass As %String, ByRef interval As %Integer) as %Integer
Set the sample interval for a metrics class
• classmethod ClearSystemCounters(System As %Boolean = 0) as %Integer
Clear the current system MONITOR counters
System = 1 indicates to specifically clear the system level counters
• classmethod Deactivate(mclass As %String) as %Integer
Deactivate a metrics class
• classmethod EmailSender(sender As %String) as %String
Set email sender
• classmethod EnableEmail(enable As %Boolean) as %Boolean
Email enabled
• classmethod Halt() as %Integer
Halt the System monitor
• classmethod HaltApp() as %Integer
Halt the monitor
• classmethod Interval(interval As %Integer) as %String
Set sampling interval
• classmethod IsActive() as %Boolean
Return summary active status: 0 - no active classes, else 1 (some active classes)
• classmethod Purge(mclass As %String) as %Integer
Purge a metrics class
• classmethod Recipients(recipients As %List) as %List
Set email recipients
• classmethod Refresh() as %Integer
Refresh the System Monitor
• classmethod RefreshApp() as %Integer
Refresh the Monitor agent
• classmethod Register(classname As %String) as %Status
Register system classes in current namespace
• classmethod Remove(mclass As %String) as %Integer
Remove a metrics class
• classmethod SignalApp() as %Integer
Signal the Monitor agent to run
• classmethod SmtpPassword(passwd As %String) as %String
Set email SMTP password
• classmethod SmtpServer(server As %String) as %String
Set email SMTP Server name. Returns current Server name (input argument is optional).
• classmethod SmtpServerPort(port As %String) as %String
Set email SMTP Server port. Returns current Server port (input argument is optional).
• classmethod SmtpServerSSL(ByRef SSLConfig As %String, ByRef UseSTARTTLS As %Boolean)
Set email SMTP SSLConfiguration and UseSTARTTLS (as defined in %Net.SMTP). Returns current SSLConfiguration and UseSTARTTLS (input arguments are optional).
• classmethod SmtpUserName(name As %String) as %String
Set email SMTP user name
• classmethod Start() as %Integer
Start the System Monitor
• classmethod StartApp() as %Integer
Start the Application Monitor
• classmethod StartSystemCounters(System As %Boolean = 0, Processes As %Integer = 10, Routines As %Integer = 60, Globals As %Integer = 25, Network As %Integer = 5, ProcessList As %List) as %Integer
Enable the system MONITOR counters

System = 1 to separately enable only system level counters (other parameters ignored)

Note that if System level counters are enabled separately, then they must also be specifically stopped or cleared separately (use System = 1 for the Stop() and Clear() methods)

Processes = the number of individual processes to collect counts for
Routines = the number of individual routines to collect counts for
Globals = the number of individual globals to collect counts for
Network = the number of individual network nodes to collect counts for
ProcessList = a $List of specific process IDs to collect counts for

Note that the MONITOR will allocate 'slots' for the number of processes, globals, routines and nodes you indicate. The first 'n' processes, routines, globals and nodes to increment the counters will take those slots, and all counts from other processes, globals, routines, and nodes will be added to the 'Other' slot.
These counters are the same metrics as reported by the PERFMON utility. If you plan to view the data collected via ^PERFMON, you should ensure that the start time for calculating per/second data is properly set for ^PERFMON by running the $$Clear^PERFMON() function. This will reset the counters and start time.
• classmethod StopSystemCounters(System As %Boolean = 0) as %Integer
Stop the system MONITOR counters

System = 1 indicates to specifically stop the system level counters (if those were started separately)
• classmethod SystemCountersActive(System As %Boolean = 0) as %String
Check if the system MONITOR counters are currently active

Returns '0' if not active, or a positive integer if active.
A '1' indicates that PERFMON (or the SystemCounters in this class) are active.
A '2' indicates that %SYS.MONLBL (or the %Monitor.System.LineByLine class) is active.
If the 'System' parameter is included as '1', then this will also return a second comma-delimited piece indicating the status of the 'system-only' level counters documented above in the StartSystemCounters() method. So, a '1,1' means both PERFMON and the system-only counters are active, but have been started separately. A '1,0' means that just a PERFMON collection was started (which includes system-level counters, but they will be stopped when PERFMON is stopped).