Monitoring multiple masters on a single slave with mk_mysql

Hello is it possible to monitor multiple master on a single slave instance of mysql maria db server? So, is it possibile even to show the connection name on the monitoring server?

I’ve changed the script with the command:
show all slaves status\G

But no multiple master have showned.

Thanks a lot
Simone

Hi Simone,

check out the documentation: Monitoring MySQL

Money-Quote:

If you run multiple MySQL instances with different user names and passwords on the host, simply create one .ini file per instance using the following naming scheme: mysql_INSTANCE-ID.ini

Have fun with the configuration!

Regards,
Simon

Hi Simon, thanks for your reply.
We don’t have different mysql mariadb instances but we have multiple connections to different master db with a unique slave. The mk_mysql plugin gave me the two different row (after changing the cmd with show all slaves status\G) but on the monitoring server we don’t have the two different slave connections.

Thanks
Simone

Maybe the technical jargon for this is “multi source replication” . Correct ?

The mk_mysql plugin gave me the two different row (after changing the cmd with show all slaves status\G) but on the monitoring server we don’t have the two different slave connections.

You just adjusted the agent plugin mk_mysql which will just generate the output.
To understand the changed output, the corresponding check plugin has to be adjusted as well.

You could use something like this and run it as an MRPE or the classic active check.

1 Like

Well that was great, thank you so much for your help!

I need a little help, i have configured the mrpe.cfg file on my remote host, but on my monitoring server I have the result: Invalid plugin status ‘127’. Output is:UNKN

Is there any hint that you can give me to make the nagios plugin work on the host?

Thank you so much

As a first step wherever you placed the script try running it manually and see if that brings any data in the first place

I confirm, if I run the script manually:
OK: Slave SQL running: Yes Slave IO running: Yes / master: 10.253.131.12 / slave is 0 seconds behind master | delay=0s
On the mrpe.cfg:
Check_Slave_SuperSi /etc/check_mk/checkslave/check_mysql_slaveconnection -H localhost -u tentacles_db -p $tentaclesdbpass -s super_si -w 30 -c 600

Error:
Invalid plugin status ‘127’. Output is:UNKN

Thank you

Ok i have solved, thank you very much for the support, the nagios plugin was pure gold!

Have a nice day

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.