|
|
|
|
@ -378,6 +378,25 @@ struct hg_metrics_map_idx {
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Required server info for the replication_lag Monitoring actions.
|
|
|
|
|
*/
|
|
|
|
|
using hostgroupid_t = int;
|
|
|
|
|
using address_t = std::string;
|
|
|
|
|
using port_t = unsigned int;
|
|
|
|
|
using current_replication_lag = int;
|
|
|
|
|
|
|
|
|
|
using replication_lag_server_t = std::tuple<hostgroupid_t,address_t,port_t,current_replication_lag>;
|
|
|
|
|
|
|
|
|
|
enum REPLICATION_LAG_SERVER_T {
|
|
|
|
|
HOSTGROUP_ID = 0,
|
|
|
|
|
ADDRESS,
|
|
|
|
|
PORT,
|
|
|
|
|
CURRENT_REPLICATION_LAG,
|
|
|
|
|
__SIZE
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class MySQL_HostGroups_Manager {
|
|
|
|
|
private:
|
|
|
|
|
SQLite3DB *admindb;
|
|
|
|
|
@ -734,7 +753,7 @@ class MySQL_HostGroups_Manager {
|
|
|
|
|
void destroy_MyConn_from_pool(MySQL_Connection *, bool _lock=true);
|
|
|
|
|
|
|
|
|
|
void replication_lag_action_inner(MyHGC *, const char*, unsigned int, int);
|
|
|
|
|
void replication_lag_action(const std::list<std::tuple<int, std::string, unsigned int, int>>& mysql_servers);
|
|
|
|
|
void replication_lag_action(const std::list<replication_lag_server_t>& mysql_servers);
|
|
|
|
|
void read_only_action(char *hostname, int port, int read_only);
|
|
|
|
|
void read_only_action_v2(const std::list<std::tuple<std::string,int,int>>& mysql_servers);
|
|
|
|
|
unsigned int get_servers_table_version();
|
|
|
|
|
|