-
-
Save spalger/16eb2597bd9add36b594e63e73aa4295 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE metrics | |
PUT metricbeat | |
{ | |
"mappings": { | |
"met": { | |
"properties": { | |
"system": { | |
"properties": { | |
"cpu": { | |
"properties": { | |
"idle": { | |
"properties": { | |
"pct": { | |
"scaling_factor": 1000, | |
"type": "scaled_float" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
GET metricbeat/_mapping/field/* | |
POST metricbeat/met | |
{ | |
"system": { | |
"cpu": { | |
"idle": { | |
"pct": 0.02 | |
} | |
} | |
} | |
} | |
POST metricbeat/met | |
{ | |
"system": { | |
"cpu": { | |
"idle": { | |
"pct": 0.03 | |
} | |
} | |
} | |
} | |
POST metricbeat/met | |
{ | |
"system": { | |
"cpu": { | |
"idle": { | |
"pct": 0.04 | |
} | |
} | |
} | |
} | |
POST metricbeat/met | |
{ | |
"system": { | |
"cpu": { | |
"idle": { | |
"pct": 0.05 | |
} | |
} | |
} | |
} | |
POST metricbeat*/_search?size=0 | |
{ | |
"aggs": { | |
"1": { | |
"avg": { | |
"script": { | |
"inline": "doc['system.cpu.idle.pct'].value", | |
"lang": "painless" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment