Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save renshuki/3eee796425580968f8e874d592845979 to your computer and use it in GitHub Desktop.
Save renshuki/3eee796425580968f8e874d592845979 to your computer and use it in GitHub Desktop.
Elasticsearch - Return JSON output with a single existing field
GET .monitoring-es*/_search
{
  "_source": ["node_stats.process.cpu.percent"],
  "size": 200,
  "query": {
   "exists": {
     "field": "node_stats.process.cpu.percent"
   }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment