Re: Unmonitored Master
Posted by: Mark Leith
Date: December 22, 2011 03:47AM

Hey Oliver,

MEM tries to do topology discovery in a couple of different ways:

1) It first tries to read the master.info file from the slave server, and use the credentials within it to connect to the master server, and select from the mysql.inventory table that every MEM agent creates. This requires that the agent is started as the same user as MySQL (so that it can read the master.info in the data directory), and that slave user has SELECT privileges against the mysql.inventory table as well.

2) If the above does not work, we fall back to IP matching - we read the Master_host / Master_port from SHOW SLAVE STATUS on the slave, if Master_host is not an IP address we do an IP lookup based on the host name, and report that back as the "Master_IP" to the MEM server. Then, every single agent reports about all of the network interfaces on each machine, so we use all of this to generate the topology based on where the IPs are pointing.

The first solution is fairly bullet proof, there's not much that stops it from getting the right topologies, given the right permissions to read everything.

The second solution has problems when using things like virtual IPs - the slave may connect to a virtual IP through to the master, but the end point IP address on the master that we know about is only as reported by the agent installed upon that master - it doesn't know about the virtual IP at the network layer before it.

In summary - I'd make sure your agent is started as the user MySQL is started as (the "mysql" user generally), and that the slave user on the master has SELECT privileges on mysql.inventory. That will give the most reliable topology discovery.

Regards,

Mark

Best regards,

Mark

--
Mark Leith
Senior Software Development Manager
MySQL Enterprise Tools @ Oracle

Options: ReplyQuote


Subject
Views
Written By
Posted
5482
December 21, 2011 09:27PM
Re: Unmonitored Master
3620
December 22, 2011 03:47AM
3325
December 23, 2011 12:28AM
3229
January 16, 2012 01:23PM
3001
February 13, 2012 01:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.