rmoff's random ramblings
about talks

Kibana Timelion - Anomaly Detection

Published Jan 18, 2017 by in Kibana, Timelion, Holt at https://rmoff.net/2017/01/18/kibana-timelion-anomaly-detection/

Using the holt function in Timelion to do anomaly detection on Metricbeat data in Kibana:

Expression:

$thres=0.02, .es(index='metricbeat*',metric='max:system.cpu.user.pct').lines(1).if(eq, 0, null).holt(0.9, 0.1, 0.9, 0.5h).color(#eee).lines(10).label('Prediction'), .es(index='metricbeat*',metric='max:system.cpu.user.pct').color(#666).lines(1).label(Actual), .es(index='metricbeat*',metric='max:system.cpu.user.pct').lines(1).if(eq, 0, null).holt(0.9, 0.1, 0.9, 0.5h).subtract(.es(index='metricbeat*',metric='max:system.cpu.user.pct')).abs().if(lt, $thres, null, .es(index='metricbeat*',metric='max:system.cpu.user.pct')).points(10,3,0).color(#c66).label('Anomaly').title('max:system.cpu.user.pct / @rmoff')

References:

  • https://twitter.com/rashidkpc/status/762754396111327232
  • https://github.com/elastic/timelion/issues/87
  • https://github.com/elastic/timelion/blob/master/FUNCTIONS.md

Robin Moffatt

Robin Moffatt works on the DevRel team at Confluent. He likes writing about himself in the third person, eating good breakfasts, and drinking good beer.

Story logo

© 2025