!--a11y-->
State
Monitor 
A non-performance monitor that monitors a String, but with the additional property of assigning colors (green, yellow, red) to the String values. Thus, a mapping must be defined from specific states to different colors (red, yellow, and green). The monitor compares the monitored states with the predefined ones and depending on the result, colors the state monitor nodes and potentially generates alerts.
For example, the state monitor can be used for the expiration state of a certificate.
· In the monitor-configuration.xml this monitor is specified in the following way:
<state-monitor name="StateMonitor" configuration-group="StateMonitor"> <monitored-resource name="TestMonitorMBean:j2eeType=SAP_TestMonitor_MBeans" type="MBEAN"/> <state-attribute-mapping> <state-attribute> <observed-resource-attribute name="TestState"/> </state-attribute> </state-attribute-mapping> </state-monitor> |
· The method returning the monitored state is:
public String getTestState(); |
· The representation in the monitoring tree:

· The representation in the Monitoring Service runtime viewer:

The states for this example are:

