charles-001 / dolphie

Your single pane of glass for real-time analytics into MySQL/MariaDB & ProxySQL
https://pypi.org/project/dolphie/
GNU General Public License v3.0
589 stars 36 forks source link

MariaDB issue #61

Closed mzaniboni-gh closed 4 months ago

mzaniboni-gh commented 4 months ago

Hi Charles,

It should work on MariaDB? Trying to connect a 5.0.0 to MariaDB 10.6 or a 5.0.1 (docker) to a MariaDB 11.2 get the same error: KeyError: 'Slave_UUID'

...
│ │                       │   group_replication_container=Container(id='group_replication_container_1'),                                                                         │                                │
│ │                       │   group_replication_grid=Container(id='group_replication_grid_1'),                                                                                   │                                │
│ │                       │   group_replication_title=Label(id='group_replication_title_1'),                                                                                     │                                │
│ │                       │   group_replication_data=Label(id='group_replication_data_1'),                                                                                       │                                │
│ │                       │   replicas_container=Container(id='replicas_container_1'),                                                                                           │                                │
│ │                       │   replicas_grid=Container(id='replicas_grid_1'),                                                                                                     │                                │
│ │                       │   replicas_loading_indicator=LoadingIndicator(id='replicas_loading_indicator_1'),                                                                    │                                │
│ │                       │   replicas_title=Label(id='replicas_title_1'),                                                                                                       │                                │
│ │                       │   proxysql_hostgroup_summary_title=Label(id='proxysql_hostgroup_summary_title_1'),                                                                   │                                │
│ │                       │   proxysql_hostgroup_summary_datatable=DataTable(id='proxysql_hostgroup_summary_datatable_1'),                                                       │                                │
│ │                       │   proxysql_mysql_query_rules_title=Label(id='proxysql_mysql_query_rules_title_1'),                                                                   │                                │
│ │                       │   proxysql_mysql_query_rules_datatable=DataTable(id='proxysql_mysql_query_rules_datatable_1'),                                                       │                                │
│ │                       │   proxysql_command_stats_title=Label(id='proxysql_command_stats_title_1'),                                                                           │                                │
│ │                       │   proxysql_command_stats_datatable=DataTable(id='proxysql_command_stats_datatable_1'),                                                               │                                │
│ │                       │   cluster_data=Static(id='cluster_data_1')                                                                                                           │                                │
│ │                       )                                                                                                                                                      │                                │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'Slave_UUID'
charles-001 commented 4 months ago

Hi @mzaniboni-gh - please provide me the entire error dump

charles-001 commented 4 months ago

Hi @mzaniboni-gh - I've pushed a code change that I think will fix this. Can you do these steps to see if it works for you?

  1. Checkout main branch of Dolphie
  2. Run poetry install
  3. Run poetry run dolphie with your normal parameters
mzaniboni-gh commented 4 months ago

Hi Charles,

Tomorrow I will try again with the steps you mentioned and I'll let you know the outcome.

Thanks! Martin

On Mon, 29 Apr 2024 at 20:58 Charles Thompson @.***> wrote:

Hi @mzaniboni-gh https://github.com/mzaniboni-gh - I've pushed a code change that I think will fix this. Can you do these steps to see if it works for you?

  1. Checkout main branch of Dolphie
  2. Run poetry install
  3. Run poetry run dolphie with your normal parameters

— Reply to this email directly, view it on GitHub https://github.com/charles-001/dolphie/issues/61#issuecomment-2083894662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZNP3BN2LQJDQ6H2MMHL6SDY73NA7AVCNFSM6AAAAABG63JRUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTHA4TINRWGI . You are receiving this because you were mentioned.Message ID: @.***>

mzaniboni-gh commented 4 months ago

Hi @mzaniboni-gh - I've pushed a code change that I think will fix this. Can you do these steps to see if it works for you?

  1. Checkout main branch of Dolphie
  2. Run poetry install
  3. Run poetry run dolphie with your normal parameters

Hey @charles-001 ... it worked!

It even started to work against proxysql 1.4 version (I know it's old) It was accomplished by adding a new column to the stats.stats_mysql_processlist table. Dolphie was complaining about the extended_info column:

proxysql> create table stats.stats_mysql_processlist_new (
    ->     ThreadID INT NOT NULL,
    ->     SessionID INTEGER PRIMARY KEY,
    ->     user VARCHAR,
    ->     db VARCHAR,
    ->     cli_host VARCHAR,
    ->     cli_port INT,
    ->     hostgroup INT,
    ->     l_srv_host VARCHAR,
    ->     l_srv_port INT,
    ->     srv_host VARCHAR,
    ->     srv_port INT,
    ->     command VARCHAR,
    ->     time_ms INT NOT NULL,
    ->     info VARCHAR,
    ->     extended_info VARCHAR);
Query OK, 0 rows affected (0.00 sec)

proxysql> alter table stats_mysql_processlist  rename to stats_mysql_processlist_old;
Query OK, 0 rows affected (0.02 sec)

proxysql> alter table stats_mysql_processlist_new  rename to stats_mysql_processlist;
Query OK, 0 rows affected (0.01 sec)

Thanks for your help! It's a really nice tool. Martin

charles-001 commented 4 months ago

That's great to hear! I'm glad everything is working for you. I'll push this fix to a new version soon.

charles-001 commented 4 months ago

This has been pushed to 5.0.2

grooverdan commented 3 months ago

thank you @charles-001