Check Elasticsearch

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
gr0mit
Posts: 2
Joined: Tue Mar 31, 2015 7:08 pm

Check Elasticsearch

Post by gr0mit »

Re. ES plugin -https://github.com/anchor/nagios-plugin-elasticsearch

I have got this working OK from the command line but having trouble adding to a client as a Nagios plugin.

I have the following configuration in /usr/local/nagios/etc/servers/clients.cfg but I just get an error returned for this service on the monitor console.
New to Nagios so any help with this would be great!

define service {
use generic-service
host_name myhost
service_description Elasticsearch
check_command check_elasticsearch
notifications_enabled 1
check_interval 5
check_period 24x7
notification_interval 30
notification_period 24x7
contact_groups admins
max_check_attempts 1
notification_options w,c,r,u
}
define command{

command_name check_elasticsearch

command_line /usr/local/bin/check_elasticsearch -H $HOSTADDRESS$

}
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Check Elasticsearch

Post by jolson »

Hello gr0mit,

First thing - it's interesting that this plugin is not in the /usr/local/nagios/libexec folder with the rest of them. Does it exist there - or only in /usr/local/bin?

Code: Select all

ls -l /usr/local/nagios/libexec |grep elasticsearch
I understand you got this working from the command line - did you try to submit the command as the nagios user?

Code: Select all

su - nagios
/usr/local/bin/check_elasticsearch -H <hostaddress>
exit
Does it work running under nagios? I have a suspicion that this could be a permission issue.
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