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$
}
Check Elasticsearch
Re: Check Elasticsearch
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?
I understand you got this working from the command line - did you try to submit the command as the nagios user?
Does it work running under nagios? I have a suspicion that this could be a permission issue.
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 elasticsearchCode: Select all
su - nagios
/usr/local/bin/check_elasticsearch -H <hostaddress>
exit