Merge branch '2.3' into 2.4

This commit is contained in:
Markus Mäkelä
2019-10-18 10:12:15 +03:00
3 changed files with 446 additions and 84 deletions

View File

@ -94,48 +94,116 @@ Commands:
List all servers in MaxScale.
Field | Description
----- | -----------
Server | Server name
Address | Address where the server listens
Port | The port on which the server listens
Connections | Current connection count
State | Server state
GTID | Current value of @@gtid_current_pos
### list services
`Usage: list services`
List all services and the servers they use.
Field | Description
----- | -----------
Service | Service name
Router | Router used by the service
Connections | Current connection count
Total Connections | Total connection count
Servers | Servers that the service uses
### list listeners
`Usage: list listeners <service>`
List listeners for a service.
Field | Description
----- | -----------
Name | Listener name
Port | The port where the listener listens
Host | The address or socket where the listener listens
State | Listener state
### list monitors
`Usage: list monitors`
List all monitors in MaxScale.
Field | Description
----- | -----------
Monitor | Monitor name
State | Monitor state
Servers | The servers that this monitor monitors
### list sessions
`Usage: list sessions`
List all client sessions.
Field | Description
----- | -----------
Id | Session ID
User | Username
Host | Client host address
Connected | Time when the session started
Idle | How long the session has been idle, in seconds
Service | The service where the session connected
### list filters
`Usage: list filters`
List all filters in MaxScale.
Field | Description
----- | -----------
Filter | Filter name
Service | Services that use the filter
Module | The module that the filter uses
### list modules
`Usage: list modules`
List all currently loaded modules.
Field | Description
----- | -----------
Module | Module name
Type | Module type
Version | Module version
### list threads
`Usage: list threads`
List all worker threads.
Field | Description
----- | -----------
Id | Thread ID
Current FDs | Current number of managed file descriptors
Total FDs | Total number of managed file descriptors
Load (1s) | Load percentage over the last second
Load (1m) | Load percentage over the last minute
Load (1h) | Load percentage over the last hour
### list users
`Usage: list users`
@ -143,12 +211,25 @@ List all worker threads.
List network the users that can be used to connect to the MaxScale REST API as
well as enabled local accounts.
Field | Description
----- | -----------
Name | User name
Type | User type
Privileges | User privileges
### list commands
`Usage: list commands`
List all available module commands.
Field | Description
----- | -----------
Module | Module name
Commands | Available commands
## show
```
@ -172,6 +253,8 @@ Commands:
threads Show all threads
logging Show MaxScale logging information
commands <module> Show module commands of a module
qc_cache Show query classifier cache
dbusers <service> Show database users of the service
```
@ -179,9 +262,24 @@ Commands:
`Usage: show server <server>`
Show detailed information about a server. The `Parameters` field contains the
currently configured parameters for this server. See `help alter server` for
more details about altering server parameters.
Show detailed information about a server. The `Parameters` field contains the currently configured parameters for this server. See `help alter server` for more details about altering server parameters.
Field | Description
----- | -----------
Server | Server name
Address | Address where the server listens
Port | The port on which the server listens
State | Server state
Last Event | The type of the latest event
Triggered At | Time when the latest event was triggered at
Services | Services that use this server
Monitors | Monitors that monitor this server
Master ID | The server ID of the master
Node ID | The node ID of this server
Slave Server IDs | List of slave server IDs
Statistics | Server statistics
Parameters | Server parameters
### show servers
@ -189,13 +287,41 @@ more details about altering server parameters.
Show detailed information about all servers.
Field | Description
----- | -----------
Server | Server name
Address | Address where the server listens
Port | The port on which the server listens
State | Server state
Last Event | The type of the latest event
Triggered At | Time when the latest event was triggered at
Services | Services that use this server
Monitors | Monitors that monitor this server
Master ID | The server ID of the master
Node ID | The node ID of this server
Slave Server IDs | List of slave server IDs
Statistics | Server statistics
Parameters | Server parameters
### show service
`Usage: show service <service>`
Show detailed information about a service. The `Parameters` field contains the
currently configured parameters for this service. See `help alter service` for
more details about altering service parameters.
Show detailed information about a service. The `Parameters` field contains the currently configured parameters for this service. See `help alter service` for more details about altering service parameters.
Field | Description
----- | -----------
Service | Service name
Router | Router that the service uses
State | Service state
Started At | When the service was started
Current Connections | Current connection count
Total Connections | Total connection count
Servers | Servers that the service uses
Parameters | Service parameter
Router Diagnostics | Diagnostics provided by the router module
### show services
@ -203,13 +329,33 @@ more details about altering service parameters.
Show detailed information about all services.
Field | Description
----- | -----------
Service | Service name
Router | Router that the service uses
State | Service state
Started At | When the service was started
Current Connections | Current connection count
Total Connections | Total connection count
Servers | Servers that the service uses
Parameters | Service parameter
Router Diagnostics | Diagnostics provided by the router module
### show monitor
`Usage: show monitor <monitor>`
Show detailed information about a monitor. The `Parameters` field contains the
currently configured parameters for this monitor. See `help alter monitor` for
more details about altering monitor parameters.
Show detailed information about a monitor. The `Parameters` field contains the currently configured parameters for this monitor. See `help alter monitor` for more details about altering monitor parameters.
Field | Description
----- | -----------
Monitor | Monitor name
State | Monitor state
Servers | The servers that this monitor monitors
Parameters | Monitor parameters
Monitor Diagnostics | Diagnostics provided by the monitor module
### show monitors
@ -217,23 +363,58 @@ more details about altering monitor parameters.
Show detailed information about all monitors.
Field | Description
----- | -----------
Monitor | Monitor name
State | Monitor state
Servers | The servers that this monitor monitors
Parameters | Monitor parameters
Monitor Diagnostics | Diagnostics provided by the monitor module
### show session
`Usage: show session <session>`
Show detailed information about a single session. The list of sessions can be
retrieved with the `list sessions` command. The <session> is the session ID of a
particular session.
Show detailed information about a single session. The list of sessions can be retrieved with the `list sessions` command. The <session> is the session ID of a particular session.
The `Connections` field lists the servers to which the session is connected and
the `Connection IDs` field lists the IDs for those connections.
The `Connections` field lists the servers to which the session is connected and the `Connection IDs` field lists the IDs for those connections.
Field | Description
----- | -----------
Id | Session ID
Service | The service where the session connected
State | Session state
User | Username
Host | Client host address
Connected | Time when the session started
Idle | How long the session has been idle, in seconds
Connections | Ordered list of backend connections
Connection IDs | Thread IDs for the backend connections
Queries | Query history
Log | Per-session log messages
### show sessions
`Usage: show sessions`
Show detailed information about all sessions. See `help show session` for more
details.
Show detailed information about all sessions. See `help show session` for more details.
Field | Description
----- | -----------
Id | Session ID
Service | The service where the session connected
State | Session state
User | Username
Host | Client host address
Connected | Time when the session started
Idle | How long the session has been idle, in seconds
Connections | Ordered list of backend connections
Connection IDs | Thread IDs for the backend connections
Queries | Query history
Log | Per-session log messages
### show filter
@ -241,18 +422,44 @@ details.
The list of services that use this filter is show in the `Services` field.
Field | Description
----- | -----------
Filter | Filter name
Module | The module that the filter uses
Services | Services that use the filter
Parameters | Filter parameters
### show filters
`Usage: show filters`
Show detailed information of all filters.
Field | Description
----- | -----------
Filter | Filter name
Module | The module that the filter uses
Services | Services that use the filter
Parameters | Filter parameters
### show module
`Usage: show module <module>`
This command shows all available parameters as well as detailed version
information of a loaded module.
This command shows all available parameters as well as detailed version information of a loaded module.
Field | Description
----- | -----------
Module | Module name
Type | Module type
Version | Module version
Maturity | Module maturity
Description | Short description about the module
Parameters | All the parameters that the module accepts
Commands | Commands that the module provides
### show modules
@ -260,36 +467,130 @@ information of a loaded module.
Displays detailed information about all modules.
Field | Description
----- | -----------
Module | Module name
Type | Module type
Version | Module version
Maturity | Module maturity
Description | Short description about the module
Parameters | All the parameters that the module accepts
Commands | Commands that the module provides
### show maxscale
`Usage: show maxscale`
See `help alter maxscale` for more details about altering MaxScale parameters.
Field | Description
----- | -----------
Version | MaxScale version
Commit | MaxScale commit ID
Started At | Time when MaxScale was started
Activated At | Time when MaxScale left passive mode
Uptime | Time MaxScale has been running
Parameters | Global MaxScale parameters
### show thread
`Usage: show thread <thread>`
Show detailed information about a worker thread.
Field | Description
----- | -----------
Id | Thread ID
Accepts | Number of TCP accepts done by this thread
Reads | Number of EPOLLIN events
Writes | Number of EPOLLOUT events
Hangups | Number of EPOLLHUP and EPOLLRDUP events
Errors | Number of EPOLLERR events
Avg event queue length | Average number of events returned by one epoll_wait call
Max event queue length | Maximum number of events returned by one epoll_wait call
Max exec time | The longest time spent processing events returned by a epoll_wait call
Max queue time | The longest time an event had to wait before it was processed
Current FDs | Current number of managed file descriptors
Total FDs | Total number of managed file descriptors
Load (1s) | Load percentage over the last second
Load (1m) | Load percentage over the last minute
Load (1h) | Load percentage over the last hour
QC cache size | Query classifier size
QC cache inserts | Number of times a new query was added into the query classification cache
QC cache hits | How many times a query classification was found in the query classification cache
QC cache misses | How many times a query classification was not found in the query classification cache
QC cache evictions | How many times a query classification result was evicted from the query classification cache
### show threads
`Usage: show threads`
Show detailed information about all worker threads.
Field | Description
----- | -----------
Id | Thread ID
Accepts | Number of TCP accepts done by this thread
Reads | Number of EPOLLIN events
Writes | Number of EPOLLOUT events
Hangups | Number of EPOLLHUP and EPOLLRDUP events
Errors | Number of EPOLLERR events
Avg event queue length | Average number of events returned by one epoll_wait call
Max event queue length | Maximum number of events returned by one epoll_wait call
Max exec time | The longest time spent processing events returned by a epoll_wait call
Max queue time | The longest time an event had to wait before it was processed
Current FDs | Current number of managed file descriptors
Total FDs | Total number of managed file descriptors
Load (1s) | Load percentage over the last second
Load (1m) | Load percentage over the last minute
Load (1h) | Load percentage over the last hour
QC cache size | Query classifier size
QC cache inserts | Number of times a new query was added into the query classification cache
QC cache hits | How many times a query classification was found in the query classification cache
QC cache misses | How many times a query classification was not found in the query classification cache
QC cache evictions | How many times a query classification result was evicted from the query classification cache
### show logging
`Usage: show logging`
See `help alter logging` for more details about altering logging parameters.
Field | Description
----- | -----------
Current Log File | The current log file MaxScale is logging into
Enabled Log Levels | List of log levels enabled in MaxScale
Parameters | Logging parameters
### show commands
`Usage: show commands <module>`
This command shows the parameters the command expects with the parameter
descriptions.
This command shows the parameters the command expects with the parameter descriptions.
Field | Description
----- | -----------
Command | Command name
Parameters | Parameters the command supports
Descriptions | Parameter descriptions
### show qc_cache
`Usage: show qc_cache`
Show contents (statement and hits) of query classifier cache.
### show dbusers
`Usage: show dbusers <service>`
Show information about the database users of the service
## set
@ -413,52 +714,24 @@ The Linux user accounts are used by the MaxAdmin UNIX Domain Socket interface
Usage: create <command>
Commands:
server <name> <host> <port> Create a new server
server <name> <host|socket> [port] Create a new server
monitor <name> <module> [params...] Create a new monitor
service <name> <router> <params...> Create a new service
filter <name> <module> [params...] Create a new filter
listener <service> <name> <port> Create a new listener
user <name> <password> Create a new network user
Common create options:
--protocol Protocol module name [string]
--authenticator Authenticator module name [string]
--authenticator-options Option string for the authenticator [string]
--tls-key Path to TLS key [string]
--tls-cert Path to TLS certificate [string]
--tls-ca-cert Path to TLS CA certificate [string]
--tls-version TLS version to use [string]
--tls-cert-verify-depth TLS certificate verification depth [string]
Create server options:
--services Link the created server to these services [array]
--monitors Link the created server to these monitors [array]
Create monitor options:
--servers Link the created service to these servers [array]
--monitor-user Username for the monitor user [string]
--monitor-password Password for the monitor user [string]
Create service options:
--servers Link the created service to these servers [array]
--filters Link the created service to these filters [array]
Create listener options:
--interface Interface to listen on [string] [default: "::"]
Create user options:
--type Type of user to create
[string] [choices: "admin", "basic"] [default: "basic"]
```
### create server
`Usage: create server <name> <host> <port>`
`Usage: create server <name> <host|socket> [port]`
The created server will not be used by any services or monitors unless the
--services or --monitors options are given. The list of servers a service or a
monitor uses can be altered with the `link` and `unlink` commands.
monitor uses can be altered with the `link` and `unlink` commands. If the
<host|socket> argument is an absolute path, the server will use a local UNIX
domain socket connection. In this case the [port] argument is ignored.
### create monitor
@ -680,31 +953,60 @@ MaxScale.
Usage: alter <command>
Commands:
server <server> <key> <value> Alter server parameters
monitor <monitor> <key> <value> Alter monitor parameters
service <service> <key> <value> Alter service parameters
service-filters <service> [filters...] Alter filters of a service
logging <key> <value> Alter logging parameters
maxscale <key> <value> Alter MaxScale parameters
user <name> <password> Alter admin user passwords
server <server> <key> <value> Alter server parameters
[params...]
monitor <monitor> <key> <value> Alter monitor parameters
[params...]
service <service> <key> <value> Alter service parameters
[params...]
service-filters <service> [filters...] Alter filters of a service
logging <key> <value> [params...] Alter logging parameters
maxscale <key> <value> [params...] Alter MaxScale parameters
user <name> <password> Alter admin user passwords
```
### alter server
`Usage: alter server <server> <key> <value>`
`Usage: alter server <server> <key> <value> ...`
To display the server parameters, execute `show server <server>`
To display the server parameters, execute `show server <server>`.
### alter [params...]
`Usage: alter <command>`
Multiple values can be updated at a time by providing the parameter name
followed by the new value. For example, the following command would change both
the `address` and the `port` parameter of a server:
alter server server1 address 127.0.0.1 port 3306
All alter commands except `alter user` and `alter service-filters` support
multiple parameters.
### alter monitor
`Usage: alter monitor <monitor> <key> <value>`
`Usage: alter monitor <monitor> <key> <value> ...`
To display the monitor parameters, execute `show monitor <monitor>`
### alter [params...]
`Usage: alter <command>`
Multiple values can be updated at a time by providing the parameter name
followed by the new value. For example, the following command would change both
the `address` and the `port` parameter of a server:
alter server server1 address 127.0.0.1 port 3306
All alter commands except `alter user` and `alter service-filters` support
multiple parameters.
### alter service
`Usage: alter service <service> <key> <value>`
`Usage: alter service <service> <key> <value> ...`
To display the service parameters, execute `show service <service>`. Some
routers support runtime configuration changes to all parameters. Currently all
@ -727,6 +1029,19 @@ service parameters can be altered at runtime:
"retain_last_statements"
]
### alter [params...]
`Usage: alter <command>`
Multiple values can be updated at a time by providing the parameter name
followed by the new value. For example, the following command would change both
the `address` and the `port` parameter of a server:
alter server server1 address 127.0.0.1 port 3306
All alter commands except `alter user` and `alter service-filters` support
multiple parameters.
### alter service-filters
`Usage: alter service-filters <service> [filters...]`
@ -742,13 +1057,13 @@ the `filters=A|B|C` parameter was defined for the service.
### alter logging
`Usage: alter logging <key> <value>`
`Usage: alter logging <key> <value> ...`
To display the logging parameters, execute `show logging`
### alter maxscale
`Usage: alter maxscale <key> <value>`
`Usage: alter maxscale <key> <value> ...`
To display the MaxScale parameters, execute `show maxscale`. The following list
of parameters can be altered at runtime: