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: 334
- 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: 334
- 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
Re: How to monitor NagiosLS from NagiosXI
I have set up two LS Alerts -- they read perfectly with the LS dashboard and I have chosen them to "Run Now". Further, I have enabled the proper token in XI, but neither alert shows up in XI's Unconfigured Objects. Any ideas?
Re: How to monitor NagiosLS from NagiosXI
Hi @LS_noob,
I'm not sure what steps you've taken when you mention enabling the proper token for XI. The best way to monitor a Nagios Log Server query from XI would be to use the Nagios Log Server wizard. All you'll need to run this wizard is your hostname for your NLS server and your API token attached to the account you are using with NLS. When complete that wizard will add a new Host to your XI with the name you provide when you run this wizard. Based on this I'm not sure why we're checking Unconfigured Objects, so I just want to be clear about your goals and the steps you've taken so far. I would try using the Nagios Log Server wizard if you haven't already. If you have, please let us know in more detail what steps you've taken so we can get this figured out.
I'm not sure what steps you've taken when you mention enabling the proper token for XI. The best way to monitor a Nagios Log Server query from XI would be to use the Nagios Log Server wizard. All you'll need to run this wizard is your hostname for your NLS server and your API token attached to the account you are using with NLS. When complete that wizard will add a new Host to your XI with the name you provide when you run this wizard. Based on this I'm not sure why we're checking Unconfigured Objects, so I just want to be clear about your goals and the steps you've taken so far. I would try using the Nagios Log Server wizard if you haven't already. If you have, please let us know in more detail what steps you've taken so we can get this figured out.