Page 1 of 2
Cassandra Monitoring plugin not working
Posted: Tue Aug 29, 2017 12:51 am
by sandeep09412
Hi,
I am following below documentation for Cassandra monitoring.
https://assets.nagios.com/downloads/nag ... ios_XI.pdf
I am facing issue in executing command on Nagios Xi server.
# /usr/local/nagios/libexec/check_nrpe -H 10.30.0.169 -c cassandra
I am getting this.
CASSANDRA CRITICAL - cannot run /home/user/apache-cassandra-3.0.14/bin/nodetool;
Can you please help me with this.
Re: Cassandra Monitoring plugin not working
Posted: Tue Aug 29, 2017 10:17 am
by bolson
Hello,
This appears to be a configuration issue or a permissions issue. Pleas post the output of the following from the remote host. (The Cassandra host):
Code: Select all
ls -l /home/user/apache-cassandra-3.0.14/bin/nodetool
Re: Cassandra Monitoring plugin not working
Posted: Tue Aug 29, 2017 12:41 pm
by sandeep09412
Code: Select all
-rwxrwxrwx. 1 user user 3359 Jun 20 04:19 nodetool
Re: Cassandra Monitoring plugin not working
Posted: Tue Aug 29, 2017 1:48 pm
by dwhitfield
On the remote host, what is the output of the following
Code: Select all
find / -name nodetool
/home/user/apache-cassandra-3.0.14/bin/nodetool
sestatus
Also, can you please post the exact command you are using...that check_nrpe command is not valid. It may be something simply, but I want to see for sure.
Re: Cassandra Monitoring plugin not working
Posted: Tue Aug 29, 2017 1:55 pm
by bolson
Please execute the following command on your Cassandra server:
And post the output.
Re: Cassandra Monitoring plugin not working
Posted: Wed Aug 30, 2017 1:55 am
by sandeep09412
I have checked cassandra is working fine and path to nodetool is correct and nodetool is having executable permission for everyone.
I am executing below caommand on cassandra server as specified in documentation.
# /usr/local/nagios/libexec/check_nrpe -H 10.30.0.169 -c cassandra
I am getting this.
CASSANDRA CRITICAL - cannot run /home/user/apache-cassandra-3.0.14/bin/nodetool;
Code: Select all
[user@localhost libexec]$ nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 127.0.0.1 228.37 KiB 256 100.0% a3c12454-d92e-4e48-82ae-6e0a19563304 rack1
Code: Select all
[user@localhost bin]$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
When i excute the plugin script through perl its working
Code: Select all
[user@localhost libexec]$ perl cassandra.pl
CASSANDRA OK - | heap_mem=9.33
Its giving that issues when the plugin script is run through
check_npre
Re: Cassandra Monitoring plugin not working
Posted: Wed Aug 30, 2017 9:44 am
by bolson
I suspect that your issue is related to selinux. Can you disable selinux on that host momentarily as a test?
Re: Cassandra Monitoring plugin not working
Posted: Wed Aug 30, 2017 11:39 am
by sandeep09412
I am using Centos7.
Still same after disableing selinux
Code: Select all
[user@localhost libexec]$ sestatus
SELinux status: disabled
Re: Cassandra Monitoring plugin not working
Posted: Wed Aug 30, 2017 1:51 pm
by bolson
Please execute locally on the cassandra host:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c cassandra
And post the result. We need to determine if the issue is communication, authentication, or permissions.
Re: Cassandra Monitoring plugin not working
Posted: Thu Aug 31, 2017 12:55 am
by sandeep09412
To check the issue i have reinstalled cassandra at other place but issue is still there.
Please find below the command output received at cassandra server
Code: Select all
[user@localhost libexec]$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c cassandra
CASSANDRA CRITICAL - cannot run /home/user/Downloads/apache-cassandra-3.11.0/bin/nodetool;
NRPE logs from /etc/log/message for the above command on cassandra server
Code: Select all
[root@localhost log]# tail -f messages
Aug 31 15:14:39 localhost xinetd[1106]: START: nrpe pid=4304 from=::ffff:127.0.0.1
Aug 31 15:14:40 localhost nrpe[4304]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Aug 31 15:14:40 localhost nrpe[4305]: ERROR: my_system() seteuid(0): Operation not permitted
Aug 31 15:14:40 localhost xinetd[1106]: EXIT: nrpe status=0 pid=4304 duration=1(sec)
From cassandra server
Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H 10.30.0.169 -c cassandra
CASSANDRA CRITICAL - cannot run /home/user/Downloads/apache-cassandra-3.11.0/bin/nodetool;
NRPE logs from /etc/log/message for the above command on cassandra server
Code: Select all
[root@localhost log]# tail -f messages
Aug 31 15:10:32 localhost xinetd[1106]: START: nrpe pid=4208 from=::ffff:10.30.0.206
Aug 31 15:10:32 localhost nrpe[4208]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Aug 31 15:10:32 localhost nrpe[4209]: ERROR: my_system() seteuid(0): Operation not permitted
Aug 31 15:10:33 localhost xinetd[1106]: EXIT: nrpe status=0 pid=4208 duration=1(sec)