MMM+mysqld_multi

53 views
Skip to first unread message

Manuel Arostegui

unread,
Sep 19, 2013, 10:16:18 AM9/19/13
to mmm-...@googlegroups.com
Hello, 

I am trying to set up an scenario where MMM should monitor two MySQL instances running in the same machine using mysqld_multi.

I have been taking a look at this: https://bugs.launchpad.net/mysql-mmm/+bug/525719 (and I have also contacted the patch submitter).

After reading the code and doing several tests I am not able to figure out how to use the "config_file" flag. 
In which file should I use it?

I have been trying to set it up at mmm_common.conf but it doesn't work.
One of the instances is being correctly monitored (the one with the file included in mmm_agent.conf) but the other one doesn't work.
When trying to do a master swap, it fails with complaining about not knowing which is the new master (clearly it is not reading the mmm_common.conf for the second MySQL instance).

I am sure it is a small thing I am not seeing.
MMM can reach properly both instances thru the different ports 3306 and 3307, it just fails when trying to change the master.

Does any one knows how to set this up?. 

Thanks a lot
Manuel.

Manuel Arostegui

unread,
Sep 20, 2013, 6:24:41 AM9/20/13
to mmm-...@googlegroups.com
Hello, 

Just for the record, Krzysztof kindly replied to me and this is what he said:


----------
Hi

You have make multi configuration file:

adb1:~# ls /etc/mysql-mmm/
ca-cert-chain.pem  mmm_agent_21.conf  mmm_agent_35.conf
mmm_agent_43.conf  mmm_agent_8.conf
mmm_adb1.crt       mmm_agent_2.conf   mmm_agent_36.conf
mmm_agent_44.conf  mmm_agent_9.conf
mmm_adb1.key       mmm_agent_31.conf  mmm_agent_37.conf
mmm_agent_4.conf   mmm_common.conf
mmm_agent_10.conf  mmm_agent_32.conf  mmm_agent_3.conf
mmm_agent_5.conf   mmm_common.conf-22.09.2011
mmm_agent_1.conf   mmm_agent_33.conf  mmm_agent_41.conf  mmm_agent_6.conf
mmm_agent_20.conf  mmm_agent_34.conf  mmm_agent_42.conf  mmm_agent_7.conf

and run agent process:

/usr/sbin/mmm_agentd @1
/usr/sbin/mmm_agentd @2
/usr/sbin/mmm_agentd @3
/usr/sbin/mmm_agentd @4
[...]
/usr/sbin/mmm_agentd @44

Regards
Krzysztof Wojtas




---------------

It has worked pretty well. 
If there's any one out there facing the same issue:

- Remember to change the port the second agent runs at (agent_port)
- Remember to change the pid file path (pid_path) the second agent will create

Both flags need to be added in your common.conf file.

I would suggest to add some documentation regarding this issue to the MMM wiki. I have tried to log-in with my launchpad account but it didn't work.

Manuel.




2013/9/19 Manuel Arostegui <man...@todo-linux.com>
Reply all
Reply to author
Forward
0 new messages