if (metric['body_match'] regex 'Error establishing a database connection') { return new AlarmStatus(CRITICAL, 'Database connection lost, returning CRITICAL.'); }
Simples.
if (metric['body_match'] regex 'Error establishing a database connection') { return new AlarmStatus(CRITICAL, 'Database connection lost, returning CRITICAL.'); }
Simples.