@ Override public void transform ( Context < MutableTimeSeriesCollectionPair > ctx ) { DateTime now = ctx . getTSData ( ) . getCurrentCollection ( ) . getTimestamp ( ) ; ctx . getTSData ( ) . getCurrentCollection ( ) . addMetrics ( MONITOR_GROUP , get_metrics_ ( now , ctx ) ) ; ctx . getAlertManager ( ) . accept ( new Alert ( now , MONITOR_DOWN_ALERT , ( ) -> "builtin rule" , Optional . of ( false ) , Duration . ZERO , "builtin rule: monitor is not running for some time" , EMPTY_MAP ) ) ; }
Emit an alert monitor . down which is in the OK state .