Page 1 of 1

Check Elasticsearch

Posted: Tue Mar 31, 2015 7:18 pm
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$

}

Re: Check Elasticsearch

Posted: Wed Apr 01, 2015 11:32 am
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.