Skip to content

Instantly share code, notes, and snippets.

@rmoff
Created January 18, 2017 19:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rmoff/0b7866b7e17059920a9ab1a80ea18eb4 to your computer and use it in GitHub Desktop.
Save rmoff/0b7866b7e17059920a9ab1a80ea18eb4 to your computer and use it in GitHub Desktop.
Metricbeat / Timelion / Kibana anomaly detection 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')
@soul3soul
Copy link

Hi, id like to talk to you abt a project where anomaly detection is required.
Get in touch with me ?

Wolframklug@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment