Status is showing Unknown when monitoring MySQL 5.7
Status is showing Unknown when monitoring MySQL 5.7
Dear Team,
I tried to monitor MySQL 5.7 but the Status is Unknow and all are working as expected.
Nagios Core is installed in CentOS 7 with check_mysql_health plugin.
Command.cfg file
define command{
command_name check_mysql_health
command_line $USER1$/check_mysql_health -H $ARG4$ --username $ARG1$ --password $ARG2$ --port $ARG5$ --mode $ARG3$
}
localhost.cfg file
define service{
use local-service
host_name ubuntu
service_description MySQL slave-sql-running
check_command check_mysql_health!nagios!nagios!slave-sqlrunning!A.B.C.D!3306!
}
MySQL is installed in Ubuntu 16.04 with the check_mysql plugin.
User for nagios in MySQL
grant all privileges on *.* to 'nagios'@'Nagios-Server-IP-Address' identified by 'nagios';
Please let me know, What is wrong or need to do some extra tasks.
Thanks in advanced
Somnath Pandey
I tried to monitor MySQL 5.7 but the Status is Unknow and all are working as expected.
Nagios Core is installed in CentOS 7 with check_mysql_health plugin.
Command.cfg file
define command{
command_name check_mysql_health
command_line $USER1$/check_mysql_health -H $ARG4$ --username $ARG1$ --password $ARG2$ --port $ARG5$ --mode $ARG3$
}
localhost.cfg file
define service{
use local-service
host_name ubuntu
service_description MySQL slave-sql-running
check_command check_mysql_health!nagios!nagios!slave-sqlrunning!A.B.C.D!3306!
}
MySQL is installed in Ubuntu 16.04 with the check_mysql plugin.
User for nagios in MySQL
grant all privileges on *.* to 'nagios'@'Nagios-Server-IP-Address' identified by 'nagios';
Please let me know, What is wrong or need to do some extra tasks.
Thanks in advanced
Somnath Pandey
Re: Status is showing Unknown when monitoring MySQL 5.7
What are the results if you try running the command from the command line:
/usr/local/nagios/libexec/check_mysql_health -H A.B.C.D --username nagios --password nagios --port 3306 --mode slave-sqlrunning
/usr/local/nagios/libexec/check_mysql_health -H A.B.C.D --username nagios --password nagios --port 3306 --mode slave-sqlrunning
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Status is showing Unknown when monitoring MySQL 5.7
Hi cdienger,
Please check the Output(error) of the /usr/local/nagios/libexec/check_mysql_health -H A.B.C.D --username nagios --password nagios --port 3306 --mode slave-sql-running
[root@localhost objects]# /usr/local/nagios/libexec/check_mysql_health -H A.B.C.D --username nagios--password nagios --port 3306 --mode slave-sql-running
CRITICAL - unable to get replication info
Firewall disable on BOTH SYSTEM
Ubuntu Client
root@Ubuntu-MySQL-Server:~# netstat -at | grep nrpe
tcp 0 0 *:nrpe *:* LISTEN
tcp6 0 0 [::]:nrpe [::]:* LISTEN
CentOS Server
[root@localhost libexec]# netstat -at | grep nrpe
tcp6 0 0 [::]:nrpe [::]:* LISTEN
Thanks
Somnath Pandey
Please check the Output(error) of the /usr/local/nagios/libexec/check_mysql_health -H A.B.C.D --username nagios --password nagios --port 3306 --mode slave-sql-running
[root@localhost objects]# /usr/local/nagios/libexec/check_mysql_health -H A.B.C.D --username nagios--password nagios --port 3306 --mode slave-sql-running
CRITICAL - unable to get replication info
Firewall disable on BOTH SYSTEM
Ubuntu Client
root@Ubuntu-MySQL-Server:~# netstat -at | grep nrpe
tcp 0 0 *:nrpe *:* LISTEN
tcp6 0 0 [::]:nrpe [::]:* LISTEN
CentOS Server
[root@localhost libexec]# netstat -at | grep nrpe
tcp6 0 0 [::]:nrpe [::]:* LISTEN
Thanks
Somnath Pandey
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Status is showing Unknown when monitoring MySQL 5.7
Is the Ubuntu machine listening for remote connections on 3306?
Code: Select all
netstat -lnp|grep 3306
check_mysql_health doesn't use additional plugins, it connects directly to the server on 3306cssp wrote:MySQL is installed in Ubuntu 16.04 with the check_mysql plugin.
Re: Status is showing Unknown when monitoring MySQL 5.7
Hi Scottwilkerson,
root@Ubuntu-MySQL-Server:~# netstat -lnp | grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1269/mysqld
Also, I can able to connect MySQL server with MySQL Workbench(which is installed on my Windows 10 machine).
Please help me with this issue.
Thanks.
root@Ubuntu-MySQL-Server:~# netstat -lnp | grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1269/mysqld
Also, I can able to connect MySQL server with MySQL Workbench(which is installed on my Windows 10 machine).
Please help me with this issue.
Thanks.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Status is showing Unknown when monitoring MySQL 5.7
Can you run any of the other modes?
Re: Status is showing Unknown when monitoring MySQL 5.7
Hi scottwilkerson,
You want to say with other user or something different?
cssp@Ubuntu-MySQL-Server:~$ netstat -lnp | grep 3306
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
Please check and update me.
Thanks
You want to say with other user or something different?
cssp@Ubuntu-MySQL-Server:~$ netstat -lnp | grep 3306
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
Please check and update me.
Thanks
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Status is showing Unknown when monitoring MySQL 5.7
With a different mode, such as the following (changing our A.B.C.D and the username/password)cssp wrote:You want to say with other user or something different?
Code: Select all
/usr/local/nagios/libexec/check_mysql_health -H A.B.C.D --username nagios --password nagios --port 3306 --mode uptime
Re: Status is showing Unknown when monitoring MySQL 5.7
Yes, I already checked but the error is showing same.
CRITICAL - unable to get replication info
CRITICAL - unable to get replication info
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Status is showing Unknown when monitoring MySQL 5.7
It doesn't make sense that you are getting a replication info error when asking for uptime.cssp wrote:Yes, I already checked but the error is showing same.
CRITICAL - unable to get replication info
Are you sure this is the error you received?