deez
deez

Reputation: 1704

Create a Kibana URL from elasticsearch query

I want to generate an automatic kibana URL according to changing hostnames for the last 15 minutes. This is the elasticsearch query i'm using:

{'query': {'bool': {'minimum_should_match': 1, 'should': [{'match': {'beat.hostname.raw': 'xxxxxxx'}}, {'match': {'beat.hostname.raw': 'yyyyyyy'}}], 'must': [{'range': {'@timestamp': {'gte': 'now-15m'}}}]}}}

How can I create a parseable URL for kibana for this search?

Thanks,

Upvotes: 6

Views: 3032

Answers (1)

deez
deez

Reputation: 1704

Posting the answer for this in case anyone will come across this:

https://kibanaurl.com/app/kibana#/discover?_g=(time:(from:now-15m,mode:quick,to:now))&_a=(columns:!(_source),filters:!((bool:(should:!((term:(beat.hostname.raw:xxxxxx)),(term:(beat.hostname.raw:yyyyyyy)))))),index:IndexName)

Upvotes: 4

Related Questions