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,
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With