- Report a bug
Detailed description of this example configuration could be found in “Typical use-cases of mmm-deployment” document.
Let’s take a look at an example configuration file for such configuration. Every deployment of mmm requires N+1 installation where N is number of MySQL servers and 1 is monitoring server (can be combined with application server). Following examples would be named as `mmm_mon.conf` for monitoring server and `mmm_agent.conf` for database servers.
mmm_mon.conf:
# # Master-Master Manager config (monitor) # # Debug mode debug no # Paths pid_path /opt/mmm/var/mmmd.pid status_path /opt/mmm/var/mmmd.status bin_path /opt/mmm/bin # Logging setup log mydebug file /opt/mmm/var/mmm-debug.log level debug log mytraps file /opt/mmm/var/mmm-traps.log level trap # MMMD command socket tcp-port bind_port 9988 agent_port 9989 monitor_ip 127.0.0.1 # Cluster interface cluster_interface eth0 # Cluster hosts addresses and access params host master1 ip 192.168.1.8 port 3306 user rep_monitor password RepMonitor mode master peer master2 host master2 ip 192.168.1.9 port 3306 user rep_monitor password RepMonitor mode master peer master1 # # Define roles # active_master_role writer # Mysql Reader role role reader mode balanced servers master1, master2 ip 192.168.1.100, 192.168.1.101 # Mysql Writer role role writer mode exclusive servers master1, master2 ip 192.168.1.200 # # Checks parameters # # Ping checker check ping check_period 1 trap_period 5 timeout 2 # Mysql checker check mysql check_period 1 trap_period 2 timeout 2 # Mysql replication backlog checker check rep_backlog check_period 5 trap_period 10 max_backlog 60 timeout 2 # Mysql replication threads checker check rep_threads check_period 1 trap_period 5 timeout 2
In this config file I want to highlight few sections:
mmm_agent.conf:
# # Master-Master Manager config (agent) # # Debug mode debug no # Paths pid_path /opt/mmm/var/mmmd_agent.pid bin_path /opt/mmm/bin # Logging setup log mydebug file /opt/mmm/var/mmm-debug.log level debug log mytraps file /opt/mmm/var/mmm-traps.log level trap # MMMD command socket tcp-port and ip bind_port 9989 # Cluster interface cluster_interface eth0 # Define current server id this master1 mode master # For masters peer master2 # Cluster hosts addresses and access params host master1 ip 192.168.1.8 port 3306 user rep_monitor password RepMonitor host master2 ip 192.168.1.9 port 3306 user rep_monitor password RepMonitor
All other config sections are pretty straightforward and described in detail in configuration files section of MMM guide.