Ad Widget

Collapse

Mariadb GTID Jumping after adding MySQL by Zabbix agent 2 Template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hansat04
    Junior Member
    • Apr 2024
    • 2

    #1

    Mariadb GTID Jumping after adding MySQL by Zabbix agent 2 Template

    Hey,

    i have a strange Problem when i add the MySQL by Zabbix agent 2 Templates to my Mariadb Replicas in a GTID Replication the GTID Jumps
    deppending on the server so
    Maria-DB-3 jumps to 1-3-*
    Maria-DB4 jumps to 1-4-*
    etc

    In the Replication log i can see that the jumps happens when the Databases trys to Truncate a Tabbele wich it normaly does not do if i do not have the Template applied to the Server the GTID also does not jump.
    Is there some sort of setting i can set in the Template that woud stop it from "jumping" the GTID?

    Code:
    0xb50968cc GTID 1-1-34142305 trans thread_id=7638583 /*M!100001 SET @@session.gtid_seq_no=34142305*//*!*/; START TRANSACTION /*!*/; # at 718505 # at 718659 #251018 17:10:58 server id 1 end_log_pos 0 CRC32 0xe14bcc39 Annotate_rows: #Q> UPDATE IP2Files #Q> SET size='104628351' #Q> WHERE ip='/' AND usr_id='0' AND file_id='87883' #251018 17:10:58 server id 1 end_log_pos 0 CRC32 0xdca9da94 Table_map: xfs.IP2Files mapped to number 56 # at 718727 #251018 17:10:58 server id 1 end_log_pos 0 CRC32 0xa37bf9fc Update_rows: table id 56 flags: STMT_END_F ### UPDATE xfs.IP2Files ### WHERE ### @1=87883 /* INT meta=0 nullable=0 is_null=0 */ ### @2='/' /* VARSTRING(45) meta=45 nullable=0 is_null=0 */ ### @3=0 /* MEDIUMINT meta=0 nullable=0 is_null=0 */ ### @4=0 /* MEDIUMINT meta=0 nullable=0 is_null=0 */ ### @5=102136891 /* LONGINT meta=0 nullable=0 is_null=0 */ ### @6=0.0000 /* DECIMAL(8,4) meta=2052 nullable=0 is_null=0 */ ### @7='/kut1cxceu62i' /* VARSTRING(255) meta=255 nullable=0 is_null=0 */ ### @8=1760799814 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */ ### @9=0 /* TINYINT meta=0 nullable=0 is_null=0 */ ### @10='Not completed' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ ### SET ### @1=87883 /* INT meta=0 nullable=0 is_null=0 */ ### @2='/' /* VARSTRING(45) meta=45 nullable=0 is_null=0 */ ### @3=0 /* MEDIUMINT meta=0 nullable=0 is_null=0 */ ### @4=0 /* MEDIUMINT meta=0 nullable=0 is_null=0 */ ### @5=104628351 /* LONGINT meta=0 nullable=0 is_null=0 */ ### @6=0.0000 /* DECIMAL(8,4) meta=2052 nullable=0 is_null=0 */ ### @7='/kut1cxceu62i' /* VARSTRING(255) meta=255 nullable=0 is_null=0 */ ### @8=1760799814 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */ ### @9=0 /* TINYINT meta=0 nullable=0 is_null=0 */ ### @10='Not completed' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ # Number of rows: 1 # at 718909 #251018 17:10:58 server id 1 end_log_pos 718940 CRC32 0x540f60ca Xid = 58926 COMMIT/*!*/; # at 718940 #251018 17:10:59 server id 2 end_log_pos 718982 CRC32 0x1a4201ca GTID 1-2-34142306 thread_id=4 /*M!100001 SET @@session.server_id=2*//*!*/; /*M!100001 SET @@session.gtid_seq_no=34142306*//*!*/; # at 718982 #251018 17:10:59 server id 2 end_log_pos 719076 CRC32 0x29ee4195 Query thread_id=4 exec_time=0 error_code=0 xid=0 SET TIMESTAMP=1760800259/*!*/; SET @@session.sql_mode=1411383296/*!*/; /*!\C utf8mb4 *//*!*/; SET @@session.character_set_client=utf8mb4,@@session.collation_connection=2304,@@session.collation_server=2304/*!*/; TRUNCATE TABLE xfs.Progress /*!*/; DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; root@Maria-DB-2:/mnt/sqldata#
    Thanks for any Help.
  • PSklyar
    Member
    • Sep 2025
    • 30

    #2
    hey hey
    I think you can try to configure zabbix template to use Non-Replicated queries

    nano /etc/zabbix/zabbix_agent2.d/plugins/mysql.conf
    Plugins.Mysql.Sessions.<session_name>.DisableBinlo g=1
    Set it per session if you have multiple sessions defined.

    Comment

    • Hansat04
      Junior Member
      • Apr 2024
      • 2

      #3
      Hey,

      sadly that did not help as that was not a known variable.

      But for any one else having the same issue in the zip archive is a Script and a Template for Zabbix.
      This Templates monitors if something with the Replication has gone wrong between the hosts.
      Attached Files

      Comment

      Working...