Skip to content

Instantly share code, notes, and snippets.

@rmoff
Created January 18, 2017 19:49
Show Gist options
  • 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 ?

[email protected]

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