MXS-1736 Wrap lines of MaxScale-Information-Schema.md
No other changes.
This commit is contained in:
parent
ec178fd8da
commit
94994268bd
@ -1,15 +1,30 @@
|
||||
# MaxInfo Plugin
|
||||
The maxinfo plugin is a special router plugin similar to the one used for implementing the server side component of the MaxAdmin interface. The plugin is designed to return data regarding the internals of MariaDB MaxScale, it provides an information schema approach to monitoring the internals of MariaDB MaxScale itself.
|
||||
The maxinfo plugin is a special router plugin similar to the one used for
|
||||
implementing the server side component of the MaxAdmin interface. The plugin
|
||||
is designed to return data regarding the internals of MariaDB MaxScale, it
|
||||
provides an information schema approach to monitoring the internals of
|
||||
MariaDB MaxScale itself.
|
||||
|
||||
The plugin is capable of returning data in one of two ways, either as MySQL result sets or as JSON encoded data. The choice of which mechanism used to return the data is determined by the type of the request the router receives. If a MySQL command is received then the router will return the results as a MySQL result set, if an HTTP request is received then the data will be returned as a JSON document.
|
||||
The plugin is capable of returning data in one of two ways, either as MySQL
|
||||
result sets or as JSON encoded data. The choice of which mechanism used to
|
||||
return the data is determined by the type of the request the router
|
||||
receives. If a MySQL command is received then the router will return the
|
||||
results as a MySQL result set, if an HTTP request is received then the data
|
||||
will be returned as a JSON document.
|
||||
|
||||
# Configuration
|
||||
|
||||
The plugin is configured in the `maxscale.cnf` configuration file in much the same way as any other router service is configured; there must be a service section in the configuration file and also listeners defined for that service. The service does not however require any backend servers to be associated with it, or any monitors.
|
||||
The plugin is configured in the `maxscale.cnf` configuration file in much
|
||||
the same way as any other router service is configured; there must be a
|
||||
service section in the configuration file and also listeners defined for
|
||||
that service. The service does not however require any backend servers to be
|
||||
associated with it, or any monitors.
|
||||
|
||||
The service entry should define the service name, the type as service and the router module to load.
|
||||
The specified user, with the password (plain or encrypted via maxpassword utility) is allowed to connect via MySQL protocol.
|
||||
Currently the user can connect to maxinfo from any remote IP and to localhost as well.
|
||||
The service entry should define the service name, the type as service and
|
||||
the router module to load. The specified user, with the password (plain or
|
||||
encrypted via maxpassword utility) is allowed to connect via MySQL
|
||||
protocol. Currently the user can connect to maxinfo from any remote IP and
|
||||
to localhost as well.
|
||||
|
||||
```
|
||||
[MaxInfo]
|
||||
@ -19,7 +34,10 @@ user=monitor
|
||||
passwd=EBD2F49C3B375812A8CDEBA632ED8BBC
|
||||
```
|
||||
|
||||
The listener section defines the protocol, port and other information needed to create a listener for the service. To listen on a port using the MySQL protocol a section as shown below should be added to the configuration file.
|
||||
The listener section defines the protocol, port and other information needed
|
||||
to create a listener for the service. To listen on a port using the MySQL
|
||||
protocol a section as shown below should be added to the configuration
|
||||
file.
|
||||
|
||||
```
|
||||
[MaxInfo Listener]
|
||||
@ -29,7 +47,8 @@ protocol=MariaDBClient
|
||||
port=9003
|
||||
```
|
||||
|
||||
To listen with the HTTP protocol and hence return JSON documents a section as should below is required.
|
||||
To listen with the HTTP protocol and hence return JSON documents a section
|
||||
as should below is required.
|
||||
|
||||
```
|
||||
[MaxInfo JSON Listener]
|
||||
@ -40,9 +59,13 @@ port=8003
|
||||
|
||||
```
|
||||
|
||||
If both the MySQL and JSON responses are required then a single service can be configured with both types of listener.
|
||||
If both the MySQL and JSON responses are required then a single service can
|
||||
be configured with both types of listener.
|
||||
|
||||
As with any other listeners within MariaDB MaxScale the listeners can be bound to a particular interface by use of the address= parameter. This allows the access to the maxinfo data to be limited to the localhost by adding an address=localhost parameter in the configuration file.
|
||||
As with any other listeners within MariaDB MaxScale the listeners can be
|
||||
bound to a particular interface by use of the address= parameter. This
|
||||
allows the access to the maxinfo data to be limited to the localhost by
|
||||
adding an address=localhost parameter in the configuration file.
|
||||
|
||||
```
|
||||
[MaxInfo Listener]
|
||||
@ -55,7 +78,9 @@ port=9003
|
||||
|
||||
# MySQL Interface to maxinfo
|
||||
|
||||
The maxinfo supports a small subset of SQL statements in addition to the MySQL status and ping requests. These may be used for simple monitoring of MariaDB MaxScale.
|
||||
The maxinfo supports a small subset of SQL statements in addition to the
|
||||
MySQL status and ping requests. These may be used for simple monitoring of
|
||||
MariaDB MaxScale.
|
||||
|
||||
```
|
||||
% mysqladmin -hmaxscale.mariadb.com -P9003 -umonitor -pxyz ping
|
||||
@ -65,13 +90,18 @@ Uptime: 72 Threads: 1 Sessions: 11
|
||||
%
|
||||
```
|
||||
|
||||
The SQL command used to interact with maxinfo is the show command, a variety of show commands are available and will be described in the following sections.
|
||||
The SQL command used to interact with maxinfo is the show command, a variety
|
||||
of show commands are available and will be described in the following
|
||||
sections.
|
||||
|
||||
Maxinfo also supports the `FLUSH LOGS`, `SET SERVER <name> <status>` and `CLEAR SERVER <name> <status>` commands. These behave the same as their MaxAdmin counterpart.
|
||||
Maxinfo also supports the `FLUSH LOGS`, `SET SERVER <name> <status>` and
|
||||
`CLEAR SERVER <name> <status>` commands. These behave the same as their
|
||||
MaxAdmin counterpart.
|
||||
|
||||
## Show variables
|
||||
|
||||
The show variables command will display a set of name and value pairs for a number of MariaDB MaxScale system variables.
|
||||
The show variables command will display a set of name and value pairs for a
|
||||
number of MariaDB MaxScale system variables.
|
||||
|
||||
```
|
||||
mysql> show variables;
|
||||
@ -93,7 +123,10 @@ mysql> show variables;
|
||||
mysql>
|
||||
```
|
||||
|
||||
The show variables command can also accept a limited like clause. This like clause must either be a literal string to match, a pattern starting with a %, a pattern ending with a % or a string with a % at both the start and the end.
|
||||
The show variables command can also accept a limited like clause. This like
|
||||
clause must either be a literal string to match, a pattern starting with a
|
||||
%, a pattern ending with a % or a string with a % at both the start and the
|
||||
end.
|
||||
|
||||
```
|
||||
mysql> show variables like 'version';
|
||||
@ -136,7 +169,9 @@ mysql>
|
||||
|
||||
## Show status
|
||||
|
||||
The show status command displays a set of status counters, as with show variables the show status command can be passed a simplified like clause to limit the values returned.
|
||||
The show status command displays a set of status counters, as with show
|
||||
variables the show status command can be passed a simplified like clause to
|
||||
limit the values returned.
|
||||
|
||||
```
|
||||
mysql> show status;
|
||||
@ -173,7 +208,8 @@ mysql>
|
||||
|
||||
## Show services
|
||||
|
||||
The show services command will return a set of basic statistics regarding each of the configured services within MariaDB MaxScale.
|
||||
The show services command will return a set of basic statistics regarding
|
||||
each of the configured services within MariaDB MaxScale.
|
||||
|
||||
```
|
||||
mysql> show services;
|
||||
@ -194,11 +230,13 @@ mysql> show services;
|
||||
mysql>
|
||||
```
|
||||
|
||||
The show services command does not accept a like clause and will ignore any like clause that is given.
|
||||
The show services command does not accept a like clause and will ignore any
|
||||
like clause that is given.
|
||||
|
||||
## Show listeners
|
||||
|
||||
The show listeners command will return a set of status information for every listener defined within the MariaDB MaxScale configuration file.
|
||||
The show listeners command will return a set of status information for every
|
||||
listener defined within the MariaDB MaxScale configuration file.
|
||||
|
||||
```
|
||||
mysql> show listeners;
|
||||
@ -224,7 +262,8 @@ The show listeners command will ignore any like clause passed to it.
|
||||
|
||||
## Show sessions
|
||||
|
||||
The show sessions command returns information on every active session within MariaDB MaxScale. It will ignore any like clause passed to it.
|
||||
The show sessions command returns information on every active session within
|
||||
MariaDB MaxScale. It will ignore any like clause passed to it.
|
||||
|
||||
```
|
||||
mysql> show sessions;
|
||||
@ -250,7 +289,9 @@ mysql>
|
||||
|
||||
## Show clients
|
||||
|
||||
The show clients command reports a row for every client application connected to MariaDB MaxScale. Like clauses are not available of the show clients command.
|
||||
The show clients command reports a row for every client application
|
||||
connected to MariaDB MaxScale. Like clauses are not available of the show
|
||||
clients command.
|
||||
|
||||
```
|
||||
mysql> show clients;
|
||||
@ -267,7 +308,10 @@ mysql>
|
||||
|
||||
## Show servers
|
||||
|
||||
The show servers command returns data for each backend server configured within the MariaDB MaxScale configuration file. This data includes the current number of connections MariaDB MaxScale has to that server and the state of that server as monitored by MariaDB MaxScale.
|
||||
The show servers command returns data for each backend server configured
|
||||
within the MariaDB MaxScale configuration file. This data includes the
|
||||
current number of connections MariaDB MaxScale has to that server and the
|
||||
state of that server as monitored by MariaDB MaxScale.
|
||||
|
||||
```
|
||||
mysql> show servers;
|
||||
@ -286,7 +330,10 @@ mysql>
|
||||
|
||||
## Show modules
|
||||
|
||||
The show modules command reports the information on the modules currently loaded into MariaDB MaxScale. This includes the name type and version of each module. It also includes the API version the module has been written against and the current release status of the module.
|
||||
The show modules command reports the information on the modules currently
|
||||
loaded into MariaDB MaxScale. This includes the name type and version of
|
||||
each module. It also includes the API version the module has been written
|
||||
against and the current release status of the module.
|
||||
|
||||
```
|
||||
mysql> show modules;
|
||||
@ -311,7 +358,8 @@ mysql>
|
||||
|
||||
## Show monitors
|
||||
|
||||
The show monitors command reports each monitor configured within the system and the state of that monitor.
|
||||
The show monitors command reports each monitor configured within the system
|
||||
and the state of that monitor.
|
||||
|
||||
```
|
||||
mysql> show monitors;
|
||||
@ -327,7 +375,9 @@ mysql>
|
||||
|
||||
## Show eventTimes
|
||||
|
||||
The show eventTimes command returns a table of statistics that reflect the performance of the event queuing and execution portion of the MariaDB MaxScale core.
|
||||
The show eventTimes command returns a table of statistics that reflect the
|
||||
performance of the event queuing and execution portion of the MariaDB
|
||||
MaxScale core.
|
||||
|
||||
```
|
||||
mysql> show eventTimes;
|
||||
@ -370,15 +420,20 @@ mysql> show eventTimes;
|
||||
mysql>
|
||||
```
|
||||
|
||||
Each row represents a time interval, in 100ms increments, with the counts representing the number of events that were in the event queue for the length of time that row represents and the number of events that were executing of the time indicated by the row.
|
||||
Each row represents a time interval, in 100ms increments, with the counts
|
||||
representing the number of events that were in the event queue for the
|
||||
length of time that row represents and the number of events that were
|
||||
executing of the time indicated by the row.
|
||||
|
||||
# JSON Interface
|
||||
|
||||
The simplified JSON interface takes the URL of the request made to maxinfo and maps that to a show command in the above section.
|
||||
The simplified JSON interface takes the URL of the request made to maxinfo
|
||||
and maps that to a show command in the above section.
|
||||
|
||||
## Variables
|
||||
|
||||
The /variables URL will return the MariaDB MaxScale variables, these variables can not be filtered via this interface.
|
||||
The /variables URL will return the MariaDB MaxScale variables, these
|
||||
variables can not be filtered via this interface.
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/variables
|
||||
@ -396,7 +451,9 @@ $
|
||||
|
||||
## Status
|
||||
|
||||
Use of the /status URI will return the status information that would normally be returned by the show status command. No filtering of the status information is available via this interface
|
||||
Use of the /status URI will return the status information that would
|
||||
normally be returned by the show status command. No filtering of the status
|
||||
information is available via this interface
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/status
|
||||
@ -427,7 +484,10 @@ $
|
||||
|
||||
## Services
|
||||
|
||||
The /services URI returns the data regarding the services defined within the configuration of MariaDB MaxScale. Two counters are returned, the current number of sessions attached to this service and the total number connected since the service started.
|
||||
The /services URI returns the data regarding the services defined within the
|
||||
configuration of MariaDB MaxScale. Two counters are returned, the current
|
||||
number of sessions attached to this service and the total number connected
|
||||
since the service started.
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/services
|
||||
@ -444,7 +504,9 @@ $
|
||||
|
||||
## Listeners
|
||||
|
||||
The /listeners URI will return a JSON array with one entry per listener, each entry is a JSON object that describes the configuration and state of that listener.
|
||||
The /listeners URI will return a JSON array with one entry per listener,
|
||||
each entry is a JSON object that describes the configuration and state of
|
||||
that listener.
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/listeners
|
||||
@ -462,7 +524,10 @@ $
|
||||
|
||||
## Modules
|
||||
|
||||
The /modules URI returns data for each plugin that has been loaded into MariaDB MaxScale. The plugin name, type and version are returned as is the version of the plugin API that the plugin was built against and the release status of the plugin.
|
||||
The /modules URI returns data for each plugin that has been loaded into
|
||||
MariaDB MaxScale. The plugin name, type and version are returned as is the
|
||||
version of the plugin API that the plugin was built against and the release
|
||||
status of the plugin.
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/modules
|
||||
@ -479,7 +544,8 @@ $
|
||||
|
||||
## Sessions
|
||||
|
||||
The /sessions URI returns a JSON array with an object for each active session within MariaDB MaxScale.
|
||||
The /sessions URI returns a JSON array with an object for each active
|
||||
session within MariaDB MaxScale.
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/sessions
|
||||
@ -499,7 +565,8 @@ $
|
||||
|
||||
## Clients
|
||||
|
||||
The /clients URI is a limited version of the /sessions, in this case it only returns an entry for a session that represents a client connection.
|
||||
The /clients URI is a limited version of the /sessions, in this case it only
|
||||
returns an entry for a session that represents a client connection.
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/clients
|
||||
@ -511,7 +578,11 @@ $
|
||||
|
||||
## Servers
|
||||
|
||||
The /servers URI is used to retrieve information for each of the servers defined within the MariaDB MaxScale configuration. This information includes the connection count and the current status as monitored by MariaDB MaxScale. The connection count is only those connections made by MariaDB MaxScale to those servers.
|
||||
The /servers URI is used to retrieve information for each of the servers
|
||||
defined within the MariaDB MaxScale configuration. This information includes
|
||||
the connection count and the current status as monitored by MariaDB
|
||||
MaxScale. The connection count is only those connections made by MariaDB
|
||||
MaxScale to those servers.
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/servers
|
||||
@ -524,7 +595,12 @@ $
|
||||
|
||||
## Event Times
|
||||
|
||||
The /event/times URI returns an array of statistics that reflect the performance of the event queuing and execution portion of the MariaDB MaxScale core. Each element is an object that represents a time bucket, in 100ms increments, with the counts representing the number of events that were in the event queue for the length of time that row represents and the number of events that were executing of the time indicated by the object.
|
||||
The /event/times URI returns an array of statistics that reflect the
|
||||
performance of the event queuing and execution portion of the MariaDB
|
||||
MaxScale core. Each element is an object that represents a time bucket, in
|
||||
100ms increments, with the counts representing the number of events that
|
||||
were in the event queue for the length of time that row represents and the
|
||||
number of events that were executing of the time indicated by the object.
|
||||
|
||||
```
|
||||
$ curl http://maxscale.mariadb.com:8003/event/times
|
||||
|
Loading…
x
Reference in New Issue
Block a user