Extract Multiple Queries

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Extract Multiple Queries

Post by rlinux57 »

How to extract multiple queries at a time ?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Extract Multiple Queries

Post by jolson »

Are you looking for a way to use the API to run multiple queries in one command? If so, try the following:

Code: Select all

curl -XPOST "http://localhost:9200/_search?pretty" -d'
{
    "fields": ["user", "message", "type"],
    "query": {
    "bool": {
      "should": [
        { "match": { "message":  "Failed" }},
        { "match": { "message": "Something Else"   }}
      ]
    }
        }
    }
}'
Explanation: https://www.elastic.co/guide/en/elastic ... rings.html
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked