Hi,
I'm trying to think of way to query ElasticSeach with HTTP GET. this is my query:
GET /test-log-YYYY.MM.DD/_count HTTP/1.1
Host: test.kibana.com:9200
User-Agent: curl/7.58.0
Accept: */*
Content-Length: 132
Content-Type: application/x-www-form-urlencoded
{ "query": { "bool": { "must": [{ "match_phrase": { "message": "time out" }}, { "range": { "date": { "gte": "now-15m" } } } ] } } }
HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 59
{"count":0,"_shards":{"total":5,"successful":5,"failed":0}}
where YYYY.MM.DD is the current date, Then it should raise alarm in case the returned count value is greater than zero, and remove alarm if it returns to zero.
It should query ElasticSearch index called test-log-YYYY.MM.DD for all events added during last 15 minutes and containing text “time out”.
How i can implement such query on Nagios?
Thanks,
Amit
Nagios - HTTP GET
Re: Nagios - HTTP GET
I will be closing this thread as it is a duplicate of another post you have made here: https://support.nagios.com/forum/viewto ... 99#p250829
In the future, please do not open multiple threads or make multiple posts for the same issue.
In the future, please do not open multiple threads or make multiple posts for the same issue.
Former Nagios employee