Skip to content

Metrics on logs

Course: Monitoring, Logging and Newrelic - chapter 10

You can add metrics on top of log counts (esp for errors) to catch if a certain error is being thrown too often/there is a spike

SELECT count(`message`) FROM Log WHERE (`entity.guid` = 'NDQ2MDY2NXxBUE18QVBQTElDQVRJT058NTY0ODg2NzU5' OR `entity.guids` LIKE '%NDQ2MDY2NXxBUE18QVBQTElDQVRJT058NTY0ODg2NzU5%' OR `service_name` = 'test' OR `serviceName` = 'test' OR `service.name` = 'test' OR `entity.name` = 'test') AND (level='error') TIMESERIES AUTO

You can also add individual set of metrics on individual errors

AND message LIKE '%there was an error%'