I already monitor my two nodes by ncpa from NagiosXI (CPU, MEM, Port, eth, disks).
I want to monitor the state of the cluster because sometimes my VPN goes down and the cluster stops to syncronize.
I found a sh script in the template site that check it by the 9200 port but this port is open only to localhost in the NagiosLS.
Can I modify some way the network settings of ElasticSearch like suggested?
transport.host: localhost
network.host: <my-ip>
or should I follow another way using ncpa?
Can you suggest me a way to implement it?
Regards,
Graziano.
How to monitor NagiosLS from NagiosXI
Re: How to monitor NagiosLS from NagiosXI
I've found check_es_cluster_status.sh into ncpa/plugins folder of my NagiosLS.
If I run it, it works.
OK: Cluster status is GREEN
But if I call it from NagiosXI it returns:
/usr/local/ncpa/plugins/check_es_cluster_status.sh: 1: python2: not found
UNKNOWN: could not retrieve cluster health data
I think it can execute the script but is there some problems about python??
Maybe about sudo??
Regards,
Graziano.
If I run it, it works.
OK: Cluster status is GREEN
But if I call it from NagiosXI it returns:
/usr/local/ncpa/plugins/check_es_cluster_status.sh: 1: python2: not found
UNKNOWN: could not retrieve cluster health data
I think it can execute the script but is there some problems about python??
Maybe about sudo??
Regards,
Graziano.
Re: How to monitor NagiosLS from NagiosXI
Solved!!!
Ubuntu uses bash not sh...
I changed /bin/sh to /bin/bash in ncpa.cfg and it works.
Regards,
Graziano.
Ubuntu uses bash not sh...
I changed /bin/sh to /bin/bash in ncpa.cfg and it works.
Regards,
Graziano.
- jmichaelson
- Posts: 264
- Joined: Wed Aug 23, 2023 1:02 pm
Re: How to monitor NagiosLS from NagiosXI
That's an interesting issue for sure. I've opened up an issue in GitHub to track it here: https://github.com/NagiosEnterprises/ncpa/issues/1214
Please let us know if you have any other questions or concerns.
-Jason
-Jason
Re: How to monitor NagiosLS from NagiosXI
Hello @xdatanet & @jmichaelson,
It seems to me that the desire here is for plugins to default to the shebang'd interpreter instead of the default interpreter defined in ncpa.cfg for the file extension. Is this correct?
It seems to me that the desire here is for plugins to default to the shebang'd interpreter instead of the default interpreter defined in ncpa.cfg for the file extension. Is this correct?
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
- jmichaelson
- Posts: 264
- Joined: Wed Aug 23, 2023 1:02 pm
Re: How to monitor NagiosLS from NagiosXI
@bbahn That's what I'm thinking
Please let us know if you have any other questions or concerns.
-Jason
-Jason
Re: How to monitor NagiosLS from NagiosXI
I will mark this as a feature request and will add it to the list of things to work on when I have some time to get back to NCPA. If anyone has any objections or concerns, I would prefer if they could be posted on the GitHub issue: https://github.com/NagiosEnterprises/ncpa/issues/1214.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
-
- Posts: 14
- Joined: Wed Jan 22, 2014 4:24 pm
Re: How to monitor NagiosLS from NagiosXI
I am glad I found this post. Thank you for sharing.
I just built a new NLS (2024R1.3) cluster on Ubuntu 24.04. I was adding it to my Nagios XI (2024R1.3.2) system with the NCPA wizard and ran into this issue.
I edited the file /usr/local/ncpa/etc/ncpa.cfg on the NLS server.
Changed the line towards the bottom of the file from this
# Linux / Mac OS X
.sh = /bin/sh $plugin_name $plugin_args
to this:
# Linux / Mac OS X
.sh = /bin/bash $plugin_name $plugin_args
Now the check in Nagios is working properly for both of the NCPA plugin files check_es_cluster_status.sh and check_es_jvm_heap.sh
I just built a new NLS (2024R1.3) cluster on Ubuntu 24.04. I was adding it to my Nagios XI (2024R1.3.2) system with the NCPA wizard and ran into this issue.
I edited the file /usr/local/ncpa/etc/ncpa.cfg on the NLS server.
Changed the line towards the bottom of the file from this
# Linux / Mac OS X
.sh = /bin/sh $plugin_name $plugin_args
to this:
# Linux / Mac OS X
.sh = /bin/bash $plugin_name $plugin_args
Now the check in Nagios is working properly for both of the NCPA plugin files check_es_cluster_status.sh and check_es_jvm_heap.sh