New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments for MySQL replication monitoring on Ubuntu 10.04 with Nagios and NRPE #545
Comments
I get errors: English locale More info at http://blog.endpoint.com/2012/01/mysql-replication-monitoring-on-ubuntu.html Can you help me? |
Can you provide the command you are issuing? I looks like a syntax error. |
./check_mysql_replication.sh -H 192.168.1.100 -P 5432 -u username -p password and I get: |
Part 1 - any possible reason this would come up? I understand it want's a number. I can dig into it further, just wondering what you think: [root@mysql1 plugins]# ./check_mysql_replication -H localhost Part 2 - Is this even checking to see if the master has anything? Or do I definitely have to run this on the Master only. It is specified in your posting to do so...just checking. |
Great stuff.. only problem is, the command fails when run via check_nrpe. When run as nagios on the server: su - nagios-bash-4.1$ /bin/bash /usr/local/nagios/libexec/check_mysql_replication.sh -H 127.0.0.1 When run via check_nrpe on the Nagios server: /usr/local/nagios/libexec/check_nrpe -H -t 30 -c check_mysql_replication Any ideas? Thanks! |
Never mind, I fixed it. Turns out it needed to run sudo before it. No idea why.. nagios user has a .my.cnf in its home directory so it shouldn't need sudo privs. Very strange. |
Please verify your nrpe.conf command is formed as specified in the article: |
Thanks Brian for the fine contribution to the Nagios (and MySQL) community! I struggled to make this work as described above under Ubuntu 12.04. Using 'sudo' as specified made the command run as the root user, which, made the file /home/nagios/.my.cnf useless. However, by changing the declaration in my nrpe.cfg file, it works as intended: command[check_mysql_replication]=sudo -u nagios /usr/lib/nagios/plugins/check_mysql_replication -H This causes the command to run as the user 'nagios'. It isn't clear to me why this is even required as I would have thought that the nagios commands would naturally run as nagios, but nothing works at all without the sudo stuff. Perhaps this is because Nagios doesn't have an environment normally, but by using sudo -u nagios, we're operating as the user nagios with the associated environment which may be required for mysql to reference the .my.cnf file? Anyway, I hope this helps someone and thanks again Brian. |
I ran this on Master db check_nrpe -H slave-ip -t 30 -c check_mysql_replication -uroot -ppassowrdgot error : |
On Nagios Server /usr/local/nagios/libexec/check_nrpe -H master-ip -t 30 -c check_mysql_replicationNRPE: Unable to read output |
I am not able to understand what are arguments required to run this on Master server ! root@Inksedge-DB-01:/usr/lib/nagios/plugins# ./check_mysql_replication -H 172.31.10.159 |
Hi I am also facing same error Unable to read output On Nagios Server : /usr/local/nagios/libexec/check_nrpe -H Master-ip -t 30 -c check_mysql_replication NRPE: Unable to read output On Master DB Server : cat /etc/nagios/nrpe.cfg command[check_mysql_replication]=sudo /usr/lib/nagios/plugins/check_mysql_replication cat /etc/sudoers nagios ALL= NOPASSWD: /usr/lib/nagios/plugins/check_mysql_replication please help what is wrong here !! |
Comments for https://www.endpointdev.com/blog/2012/01/mysql-replication-monitoring-on-ubuntu/
By Brian Buchalter
To enter a comment:
The text was updated successfully, but these errors were encountered: