Hello,
Just stumbled on this:
https://exchange.nagios.org/directory/A ... ng/details
And wondered if that is something we could use for nls?
Grtz
Willem
Elasticsearch-health-monitoring plugin
-
- Posts: 2320
- Joined: Wed Mar 20, 2013 5:49 am
- Location: Ghent
Elasticsearch-health-monitoring plugin
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
- Attack Rabbit
- Posts: 2560
- Joined: Thu Feb 12, 2015 12:40 pm
Re: Elasticsearch-health-monitoring plugin
Definitely - there's actually a nice one that I have tested and verified as functional:
https://github.com/anchor/nagios-plugin-elasticsearch
In general, most plugins that work with elasticsearch will work with Nagios Log Server. Remember that the plugins should be run locally, since we deny outside access to elasticsearch without appropriate authentication.
https://github.com/anchor/nagios-plugin-elasticsearch
Code: Select all
pip install nagios-plugin-elasticsearch
/usr/bin/check_elasticsearch -H 127.0.0.1 -m 1
-
- Posts: 2320
- Joined: Wed Mar 20, 2013 5:49 am
- Location: Ghent
Re: Elasticsearch-health-monitoring plugin
Jesse,
I've been trying to plugin and something seems wrong with the perfdata. I'm not getting any graphs, although the service details do show perfdata. Any ideas?
I've been trying to plugin and something seems wrong with the perfdata. I'm not getting any graphs, although the service details do show perfdata. Any ideas?
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
- Attack Rabbit
- Posts: 2560
- Joined: Thu Feb 12, 2015 12:40 pm
Re: Elasticsearch-health-monitoring plugin
This wound up working for me. Did you wait the required 15 minutes or so for the service to plot a few data points?
You do not have the required permissions to view the files attached to this post.
-
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
Re: Elasticsearch-health-monitoring plugin
Each datasource has 1 too many ;WillemDH wrote:Jesse,
I've been trying to plugin and something seems wrong with the perfdata. I'm not getting any graphs, although the service details do show perfdata. Any ideas?
cluster_nodes=2;;;;;
Should be:
cluster_nodes=2;;;;
Because of this the performance data will be discarded.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 2320
- Joined: Wed Mar 20, 2013 5:49 am
- Location: Ghent
Re: Elasticsearch-health-monitoring plugin
Hmmm ok, I see. Question is why Jesse's version has the correct amount of ; and I don't? had a look through the python script, but didn't immediately found any cause. When I execute this from CLI I also get 5 ;
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
- Attack Rabbit
- Posts: 2560
- Joined: Thu Feb 12, 2015 12:40 pm
Re: Elasticsearch-health-monitoring plugin
My perfdata actually has five semicolons as well - I don't think that is the problem.
/usr/bin/check_elasticsearch
How is your check being performed?
Also, what version of python are you running?
Willem, how do you have your service check configured? Mine is performing without the use of any flags /usr/bin/check_elasticsearch
How is your check being performed?
Also, what version of python are you running?
Code: Select all
python -V
You do not have the required permissions to view the files attached to this post.
-
- Posts: 2320
- Joined: Wed Mar 20, 2013 5:49 am
- Location: Ghent
Re: Elasticsearch-health-monitoring plugin
Jesse,
I'm executing the plugin with check_nrpe. I added
to /usr/local/nagios/etc/nrpe/common.cfg
And this is the command I'm executing from Nagios:
The service has been cloned from another service where perfdata works fine.
I'm executing the plugin with check_nrpe. I added
Code: Select all
command[check_elasticsearch]=/usr/bin/check_elasticsearch -H 127.0.0.1 -m 1
And this is the command I'm executing from Nagios:
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_nrpe -H nls-server -t 120 -c check_elasticsearch
OUTPUT: Monitoring cluster 'ee9e60a0-f4cb-41ec-a97f-8f17434b748e' | cluster_nodes=2;;;;; cluster_master_eligible_nodes=2;;;;; cluster_data_nodes=2;;;;; cluster_active_shards=342;;;;; cluster_relocating_shards=0;;;;; cluster_initialising_shards=0;;;;; cluster_unassigned_shards=0;;;;; cluster_total_shards=342;;;;; cluster_total_indices=35;;;;; cluster_closed_indices=0;;;;; storesize=451346100119B;;;;; documents=487909914c;;;;; index_ops=27868667c;;;;; index_time=15449587ms;;;;; flush_ops=409c;;;;; flush_time=54353ms;;;;; throttle_time=6070112ms;;;;; index_ops=27868667c;;;;; index_time=15449587ms;;;;; delete_ops=0c;;;;; delete_time=0ms;;;;; get_ops=12389c;;;;; get_time=3130ms;;;;; exists_ops=12336c;;;;; exists_time=3126ms;;;;; missing_ops=53c;;;;; missing_time=4ms;;;;; query_ops=40003c;;;;; query_time=251105ms;;;;; fetch_ops=39736c;;;;; fetch_time=6876ms;;;;; merge_ops=21416c;;;;; refresh_ops=106074c;;;;; refresh_time=4176375ms;;;;; gc_old_count=4c;;;;; gc_young_count=15931c;;;;; heap_used=35%;;;;;
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
- Attack Rabbit
- Posts: 2560
- Joined: Thu Feb 12, 2015 12:40 pm
Re: Elasticsearch-health-monitoring plugin
Interesting. What happens if you make another service using the exact commands you've described to me? I replicated your setup on a test cluster of mine and everything worked properly.
What does your 'performance graphs' page look like? I assume it's simply blank?
What does your 'performance graphs' page look like? I assume it's simply blank?
-
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
Re: Elasticsearch-health-monitoring plugin
I believe newer versions of rrdtool is particular about this. I think it starts when you implement rrdcached as that installs a newer version of rrdtool than what is shipped with XI.jolson wrote:My perfdata actually has five semicolons as well - I don't think that is the problem.
I'm pretty sure if @willemdh increases the logging verbosity then he would see the data being discarded in the logs:
http://support.nagios.com/wiki/index.ph ... leshooting
Code: Select all
tail -f /usr/local/nagios/var/perfdata.log > /tmp/perfdata.txt
tail -f /usr/local/nagios/var/npcd.log > /tmp/npcd.txt
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.