MXS-839: Store additional server information in mysqlmon
Mysqlmon now stores the values of read_only, slave_sql_running, slave_io_running, the name and position of the masters binlog and the replication configuration status of the slave. This allows more detailed server information to be displayed with the `show monitor <name>` diagnostic interface. In addition to this, the new structure used to store them provides an easy way to store information that is specific to a monitor and the servers it monitors. These new status variables can be used to implement better multi-master detection in mysqlmon by using the value of read_only to resolve situations where multiple master candidates are available.
This commit is contained in:
@ -28,6 +28,7 @@
|
||||
#include <modinfo.h>
|
||||
#include <maxconfig.h>
|
||||
#include <externcmd.h>
|
||||
#include <hashtable.h>
|
||||
|
||||
/**
|
||||
* @file mysqlmon.h - The MySQL monitor
|
||||
@ -69,6 +70,7 @@ typedef struct
|
||||
MONITOR_SERVERS *master; /**< Master server for MySQL Master/Slave replication */
|
||||
char* script; /*< Script to call when state changes occur on servers */
|
||||
bool events[MAX_MONITOR_EVENT]; /*< enabled events */
|
||||
HASHTABLE *server_info; /**< Contains server specific information */
|
||||
} MYSQL_MONITOR;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user