Nagios - HTTP GET

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amitw
Posts: 28
Joined: Tue Jun 28, 2016 8:07 am

Nagios - HTTP GET

Post by amitw »

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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios - HTTP GET

Post by tmcdonald »

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.
Former Nagios employee
Locked