MaxScale Monitor Resource
Control server monitoring modules. This resource allows you to configure monitors, check cluster health status, and modify monitoring parameters dynamically.
Overview
Resource Operations
Get a monitor
GET /v1/monitors/:nameResponse
{
"data": {
"attributes": {
"module": "mariadbmon",
"monitor_diagnostics": {
"failback_master": null,
"master": "server1",
"master_gtid_domain_id": 0,
"primary": null,
"server_info": [
{
"gtid_binlog_pos": "0-3000-5",
"gtid_current_pos": "0-3000-5",
"lock_held": null,
"master_group": null,
"name": "server1",
"read_only": false,
"server_id": 3000,
"slave_connections": []
},
{
"gtid_binlog_pos": "0-3000-5",
"gtid_current_pos": "0-3000-5",
"lock_held": null,
"master_group": null,
"name": "server2",
"read_only": false,
"server_id": 3001,
"slave_connections": [
{
"connection_name": "",
"gtid_io_pos": "",
"last_io_error": "",
"last_sql_error": "",
"master_host": "127.0.0.1",
"master_port": 3000,
"master_server_id": 3000,
"master_server_name": "server1",
"seconds_behind_master": 0,
"slave_io_running": "Yes",
"slave_sql_running": "Yes",
"using_gtid": "No"
}
]
}
],
"state": "Idle"
},
"parameters": {
"assume_unique_hostnames": true,
"auto_failback_switchover": false,
"auto_failover": "false",
"auto_rejoin": false,
"backend_connect_attempts": 1,
"backend_timeout": "3000ms",
"backup_storage_address": null,
"backup_storage_path": null,
"cooperative_monitoring_locks": "none",
"cs_admin_api_key": null,
"cs_admin_base_path": "/cmapi/0.4.0",
"cs_admin_port": 8640,
"demotion_sql_file": null,
"disk_space_check_interval": "0ms",
"disk_space_threshold": null,
"enforce_read_only_servers": false,
"enforce_read_only_slaves": false,
"enforce_simple_topology": false,
"enforce_writable_master": false,
"events": "all,master_down,master_up,slave_down,slave_up,server_down,server_up,synced_down,synced_up,donor_down,donor_up,lost_master,lost_slave,lost_synced,lost_donor,new_master,new_slave,new_synced,new_donor",
"failcount": 5,
"failover_timeout": "90000ms",
"handle_events": true,
"journal_max_age": "28800000ms",
"maintenance_on_low_disk_space": true,
"mariabackup_parallel": 1,
"mariabackup_use_memory": "1G",
"master_conditions": "primary_monitor_master,disk_space_ok",
"master_failure_timeout": "10000ms",
"module": "mariadbmon",
"monitor_interval": "1000ms",
"password": "*****",
"primary_state_sql": null,
"promotion_sql_file": null,
"rebuild_port": 4444,
"replica_state_sql": null,
"replication_custom_options": null,
"replication_master_ssl": false,
"replication_password": "*****",
"replication_user": "maxuser",
"role": null,
"script": null,
"script_max_replication_lag": -1,
"script_timeout": "90000ms",
"servers_no_cooperative_monitoring_locks": null,
"servers_no_promotion": null,
"slave_conditions": "",
"ssh_check_host_key": true,
"ssh_keyfile": null,
"ssh_port": 22,
"ssh_timeout": "10000ms",
"ssh_user": null,
"switchover_on_low_disk_space": false,
"switchover_timeout": "90000ms",
"type": "monitor",
"user": "maxuser",
"verify_master_failure": true,
"write_test_fail_action": "log",
"write_test_interval": "0ms",
"write_test_table": "mxs.maxscale_write_test"
},
"source": {
"file": "/etc/maxscale.cnf",
"type": "static"
},
"state": "Running",
"ticks": 12
},
"id": "MariaDB-Monitor",
"links": {
"self": "http://localhost:8989/v1/monitors/MariaDB-Monitor/"
},
"relationships": {
"servers": {
"data": [
{
"id": "server1",
"type": "servers"
},
{
"id": "server2",
"type": "servers"
}
],
"links": {
"related": "http://localhost:8989/v1/servers/",
"self": "http://localhost:8989/v1/monitors/MariaDB-Monitor/relationships/servers/"
}
},
"services": {
"data": [
{
"id": "RW-Split-Router",
"type": "services"
}
],
"links": {
"related": "http://localhost:8989/v1/services/",
"self": "http://localhost:8989/v1/monitors/MariaDB-Monitor/relationships/services/"
}
}
},
"type": "monitors"
},
"links": {
"self": "http://localhost:8989/v1/monitors/MariaDB-Monitor/"
}
}Get all monitors
Response
Get monitor relationships
Response
Create a monitor
Response
Update a monitor
Modifiable Fields
Response
Update monitor relationships
Response
Destroy a monitor
Response
Stop a monitor
Response
Start a monitor
Response
Last updated
Was this helpful?

