The binlog router provides several metrics via the output of maxadmin show services.
These need to be parsed and processed and are not in a very useful format.
It would be convenient to be able to access this status information using the new maxinfo infrastructure, probably in several "tables". The following values below imply having a single master whereas in reality MaxScale could have more than one configured binlog router. For now I'm only assuming the case of having a single active connection.
The type of thing that I would like to see are:
- number of connected clients via the SQL interface
- number of connected slaves via the SQL interface
- connected_to_master (values: 0 / 1) to indicate if I'm connected to the master
- number of packets received from the master
- number of connections to the master
- number of disconnections from the master
- number of events received from the master
- number of transactions received from the master (transaction safety functionality)
- number of heartbeats events received from the master
- connection time to the master (in seconds)
For the slaves we basically want the same values. MaxScale can not at the moment do aggregations so you probably want to create a table with the current connected slaves which looks like this:
Given I can't do SELECT sum(...), Sum(...) from ... GROUP BY ... then having a sum_all_slaves table with the sum of the above metrics for all active slaves, would probably be good. Don't forget to add an additional count_slaves column so that we know for how many slaves the values are being shown.
Providing this sort of output via some maxinfo structures would be good.