Ad Widget

Collapse

Discussion thread for official Zabbix Template DB MySQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • -sanches-
    Junior Member
    • Jun 2016
    • 3

    #31
    Version 4.4.8 of agent and server.

    Comment

    • max.ch.88
      Senior Member
      • Oct 2018
      • 206

      #32
      Originally posted by -sanches-
      Hello
      A Zabbix server receive data from agent with log
      172255:20200502:233142.112 error reason for "Zabbix server:mysql.status[Uptime]" changed: Value "Uptime 81576" of type "string" is not suitable for value type "Numeric (unsigned)"
      172264:20200502:233231.147 error reason for "Zabbix server:mysql.status[Bytes_received]" changed: Preprocessing failed for: Bytes_received.1911572904
      1. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
      172254:20200502:233232.618 error reason for "Zabbix server:mysql.status[Bytes_sent]" changed: Preprocessing failed for: Bytes_sent.6154555010
      1. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type

      What's mean?
      Your items are incorrectly configured. Please, try the official template https://git.zabbix.com/projects/ZBX/...Frelease%2F4.4 or use it as an example to create own template.
      Last edited by max.ch.88; 14-05-2020, 08:57.

      Comment

      • altuhovsu
        Junior Member
        • Jun 2020
        • 6

        #33
        Would be great to add an Item and Trigger to the templates (Agent and Agent 2).

        prepared_stmt_count is very important to monitor if using ProxySQL.

        For example, this is my trigger:
        Code:
        {Template DB MySQL by Zabbix agent 2:mysql.prepared_stmt_count.last()}>60000

        Comment

        • Gijs007
          Member
          • Oct 2017
          • 40

          #34
          Never mind. Turned out I was having some old user paramaters left in the zabbix agent config, from a previous template, which conflicted with the official template.
          Also was using the Zabbix 2 template, while I should be using the Zabbix 1 template on Windows.
          Last edited by Gijs007; 03-07-2020, 00:46.

          Comment

          • andvsilva
            Member
            • Aug 2020
            • 39

            #35
            Hi,
            How can I monitor multiple instances? with this template? It is possible?

            Comment

            • raianeli
              Junior Member
              • Sep 2020
              • 1

              #36
              Hi, I'm having problems with monitoring MARIADB in another host (it isn't zabbix server).

              All configurations are okay but i get this error message:


              ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

              Someone knows what can i do to solve this problem?

              Comment

              • max.ch.88
                Senior Member
                • Oct 2018
                • 206

                #37
                Originally posted by andvsilva
                Hi,
                How can I monitor multiple instances? with this template? It is possible?
                Yes, it is possible. Please configure the required agent or template parameters as written in the template README file.

                Comment

                • max.ch.88
                  Senior Member
                  • Oct 2018
                  • 206

                  #38
                  Originally posted by raianeli
                  Hi, I'm having problems with monitoring MARIADB in another host (it isn't zabbix server).

                  All configurations are okay but i get this error message:


                  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

                  Someone knows what can i do to solve this problem?
                  What template and agent are you using? How did you configure them?

                  Comment

                  • thoja21
                    Junior Member
                    • Oct 2020
                    • 4

                    #39
                    Can't configure this atm. template_db_mysql.conf is on git.zabbix.com which appears to be down (504)... Either that, or the help docs are out of date.

                    Also, a suggestion to the template, could we please add a little extra info on where template_db_mysql.conf can be obtained in the template description? I had to get here via Google, which isn't a great user experience. Something as simple as the URL in brackets after the file name? Or a link to a help doc that contains this info?

                    Comment

                    • max.ch.88
                      Senior Member
                      • Oct 2018
                      • 206

                      #40
                      Originally posted by thoja21
                      Can't configure this atm. template_db_mysql.conf is on git.zabbix.com which appears to be down (504)... Either that, or the help docs are out of date.

                      Also, a suggestion to the template, could we please add a little extra info on where template_db_mysql.conf can be obtained in the template description? I had to get here via Google, which isn't a great user experience. Something as simple as the URL in brackets after the file name? Or a link to a help doc that contains this info?
                      Hi. This documentation https://www.zabbix.com/documentation...irements/mysql is up to date. It contains a link to the git repository with origin files and information about where to put the conf file.

                      Comment

                      • grvas
                        Junior Member
                        • Dec 2014
                        • 2

                        #41
                        Hello, team.

                        Zabbix server and agent 5.2.3 running on CentOS 8. This is my first time setting up monitoring for MySQL and I set up monitoring as per https://git.zabbix.com/projects/ZBX/...b/mysql_agent2. MySQL version 8.0.20 is running on AWS RDS.

                        I started receiving some triggered alerts via email and each one lists ["{$MYSQL.DSN}","{$MYSQL.USER}","{$MYSQL.PASSWO RD}"] as a part of the email alert, which effectively leaks sensitive information.

                        I must be missing something obvious. Please help. Thank you.

                        Comment

                        • Frogg
                          Junior Member
                          • Mar 2020
                          • 18

                          #42
                          Hi there,

                          I just found this thread and some gor exactly the same error message

                          Code:
                          noname.xml:1: parser error : Start tag expected, '<' not found
                          ERROR 1045 (28000): Access denied for user 'zabbix'@'database.excelliance.net'
                          More info on my config and troube there :

                          https://www.zabbix.com/forum/zabbix-...rom-agent-conf

                          Finally i got it solved it came from client version & server version matching



                          Now i got 3 errors from userparameter_mysql.conf i think


                          This one maybe due to special char in password ?
                          Code:
                          error reason for "database.excelliance.net:mysql.dbsize["{$MYSQL.HOST}","{$MYSQL.PORT}","ERROR 1045 (28000): Access denied for user 'zabbix'@'sub.domain.ex' (using password: NO)"]" changed: Special characters "\, ', ", `, *, ?, [, ], {, }, ~, $, !, &, ;, (, ), <, >, |, #, @, 0x0a" are not allowed in the parameters.
                          denied for user 'zabbix'@'sub.domain.ext' (using password: NO)"]" changed: Special characters "\, ', ", `, *, ?, [, ], {, }, ~, $, !, &, ;, (, ), <, >, |, #, @, 0x0a" are not allowed in the parameters.
                          And thoose maybe cause Mariadb return XML format in stead of value ?

                          Code:
                           error reason for "database.excelliance.net:mysql.connection_errors_ tcpwrap.rate" changed: Preprocessing failed for: <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                          1. Result:
                          2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type

                          Code:
                           item "database.excelliance.net:mysql.get_status_var iabl es["{$MYSQL.HOST}","{$MYSQL.PORT}"]" became supported
                          8 error reason for "database.excelliance.net:mysql.connection_err ors_ internal.rate" changed: Preprocessing failed for : <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                          1. Result:
                          2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
                          8 error reason for "database.excelliance.net:mysql.connection_err ors_ max_connections.rate" changed: Preprocessing fai led for: <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                          1. Result:
                          2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
                          8 error reason for "database.excelliance.net:mysql.connection_err ors_ accept.rate" changed: Value "" of type "string" is not suitable for value type "Numeric (float)"
                          8 error reason for "database.excelliance.net:mysql.connection_err ors_ select.rate" changed: Preprocessing failed for: <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                          1. Result:
                          2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
                          error reason for "database.excelliance.net:mysql.connection_err ors_ peer_address.rate" changed: Preprocessing failed for: <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                          1. Result:
                          2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
                          error reason for "database.excelliance.net:mysql.ping["{$MYSQL.HOST}","{$MYSQL.PORT}"]" changed: Item does not allo w parameters.

                          Thanks in advance !
                          Last edited by Frogg; 29-01-2021, 02:51.

                          Comment

                          • Neal.H
                            Junior Member
                            • Jun 2020
                            • 11

                            #43
                            Hi,

                            I'm looking to monitor MySQL multi source replication. The current replication discovery seems to detect multiple channels - but does nothing sensible with the information so when it sets up the discovered items/triggers they are all for the first channel only. eg:

                            Replication setup with two sources (Note the 1.2.3.27 host is currently timing out due to my testing - it was previously working fine as shown by the retrieved/executed gtid sets):
                            Code:
                            mysql> show slave status \G
                            *************************** 1. row ***************************
                            Slave_IO_State: Waiting for master to send event
                            Master_Host: 1.2.3.21
                            <...SNIP...>
                            Slave_IO_Running: Yes
                            Slave_SQL_Running: Yes
                            <...SNIP...>
                            Master_Server_Id: 1
                            Master_UUID: 29c3d80e-7c1f-11eb-905e-567b37c76ce1
                            <...SNIP...>
                            Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
                            <...SNIP...>
                            Retrieved_Gtid_Set: 29c3d80e-7c1f-11eb-905e-567b37c76ce1:2-211090,
                            44339fe4-7c20-11eb-b33e-9a14e830d8bb:1-204643,
                            4649be24-7c20-11eb-b1ca-fa6df6df55b6:1-204066
                            Executed_Gtid_Set: 29c3d80e-7c1f-11eb-905e-567b37c76ce1:1-211090,
                            42ea9714-7c20-11eb-b71e-b640712fe396:1-210808,
                            44339fe4-7c20-11eb-b33e-9a14e830d8bb:1-204643,
                            4649be24-7c20-11eb-b1ca-fa6df6df55b6:1-204066
                            Auto_Position: 1
                            Replicate_Rewrite_DB:
                            Channel_Name: 
                            Master_TLS_Version:
                            *************************** 2. row ***************************
                            Slave_IO_State: Reconnecting after a failed master event read
                            Master_Host: 1.2.3.27
                            <...SNIP...>
                            Slave_IO_Running: Connecting
                            Slave_SQL_Running: Yes
                            <...SNIP...>
                            Master_Server_Id: 17
                            Master_UUID: 4649be24-7c20-11eb-b1ca-fa6df6df55b6
                            Master_Info_File: mysql.slave_master_info
                            <...SNIP...>
                            Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
                            <...SNIP...>
                            Retrieved_Gtid_Set: 29c3d80e-7c1f-11eb-905e-567b37c76ce1:1036-204928,
                            44339fe4-7c20-11eb-b33e-9a14e830d8bb:750-204643,
                            4649be24-7c20-11eb-b1ca-fa6df6df55b6:1-204066
                            Executed_Gtid_Set: 29c3d80e-7c1f-11eb-905e-567b37c76ce1:1-211090,
                            42ea9714-7c20-11eb-b71e-b640712fe396:1-210808,
                            44339fe4-7c20-11eb-b33e-9a14e830d8bb:1-204643,
                            4649be24-7c20-11eb-b1ca-fa6df6df55b6:1-204066
                            Auto_Position: 1
                            Replicate_Rewrite_DB:
                            Channel_Name: linkb
                            Master_TLS_Version:
                            2 rows in set (0.00 sec)
                            
                            mysql>
                            Zabbix discovery detects both channels:
                            Code:
                            # zabbix_get -s db-replica.example.net -k mysql.replication.discovery['unix:/var/lib/mysql/mysql.sock','root','NotMyRealPassword!']
                            
                            [{"Master_Host":"1.2.3.21"},{"Master_Host":"1.2.3.27"}]
                            So each replication channel gets a set of items, triggers etc. However the items all return data for just the FIRST replication channel not subsequent ones. It looks like this is down to the item just pulling the results of "SHOW SLAVE STATUS" and then returning only a single row (line 46 of https://git.zabbix.com/projects/ZBX/...tion_status.go )

                            I'm guessing that to resolve this we would need to return the channel name as well as the master_host from the discovery, then update the discovered items to include that and the handler_replication_status.go file to actually use it.

                            Is there any chance of changes for this being accepted, or is it too much of a risky change for the few people who use multi source replication? Or even better have I missed another option that already covers this use case?

                            Cheers,
                            Neal.


                            Comment

                            • max.ch.88
                              Senior Member
                              • Oct 2018
                              • 206

                              #44
                              Originally posted by grvas
                              Hello, team.

                              Zabbix server and agent 5.2.3 running on CentOS 8. This is my first time setting up monitoring for MySQL and I set up monitoring as per https://git.zabbix.com/projects/ZBX/...b/mysql_agent2. MySQL version 8.0.20 is running on AWS RDS.

                              I started receiving some triggered alerts via email and each one lists ["{$MYSQL.DSN}","{$MYSQL.USER}","{$MYSQL.PASSWO RD}"] as a part of the email alert, which effectively leaks sensitive information.

                              I must be missing something obvious. Please help. Thank you.
                              Please, check and change Action which sends the email alert

                              Comment

                              • max.ch.88
                                Senior Member
                                • Oct 2018
                                • 206

                                #45
                                Originally posted by Frogg
                                Hi there,

                                I just found this thread and some gor exactly the same error message

                                Code:
                                noname.xml:1: parser error : Start tag expected, '<' not found
                                ERROR 1045 (28000): Access denied for user 'zabbix'@'database.excelliance.net'
                                More info on my config and troube there :

                                https://www.zabbix.com/forum/zabbix-...rom-agent-conf

                                Finally i got it solved it came from client version & server version matching



                                Now i got 3 errors from userparameter_mysql.conf i think


                                This one maybe due to special char in password ?
                                Code:
                                error reason for "database.excelliance.net:mysql.dbsize["{$MYSQL.HOST}","{$MYSQL.PORT}","ERROR 1045 (28000): Access denied for user 'zabbix'@'sub.domain.ex' (using password: NO)"]" changed: Special characters "\, ', ", `, *, ?, [, ], {, }, ~, $, !, &, ;, (, ), <, >, |, #, @, 0x0a" are not allowed in the parameters.
                                denied for user 'zabbix'@'sub.domain.ext' (using password: NO)"]" changed: Special characters "\, ', ", `, *, ?, [, ], {, }, ~, $, !, &, ;, (, ), <, >, |, #, @, 0x0a" are not allowed in the parameters.
                                And thoose maybe cause Mariadb return XML format in stead of value ?

                                Code:
                                 error reason for "database.excelliance.net:mysql.connection_errors_ tcpwrap.rate" changed: Preprocessing failed for: <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                                1. Result:
                                2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type

                                Code:
                                 item "database.excelliance.net:mysql.get_status_var iabl es["{$MYSQL.HOST}","{$MYSQL.PORT}"]" became supported
                                8 error reason for "database.excelliance.net:mysql.connection_err ors_ internal.rate" changed: Preprocessing failed for : <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                                1. Result:
                                2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
                                8 error reason for "database.excelliance.net:mysql.connection_err ors_ max_connections.rate" changed: Preprocessing fai led for: <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                                1. Result:
                                2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
                                8 error reason for "database.excelliance.net:mysql.connection_err ors_ accept.rate" changed: Value "" of type "string" is not suitable for value type "Numeric (float)"
                                8 error reason for "database.excelliance.net:mysql.connection_err ors_ select.rate" changed: Preprocessing failed for: <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                                1. Result:
                                2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
                                error reason for "database.excelliance.net:mysql.connection_err ors_ peer_address.rate" changed: Preprocessing failed for: <?xml version="1.0"?>..<resultset statement="show global status." xmlns:xsi="http://www.w3.org/20...
                                1. Result:
                                2. Failed: cannot calculate delta (speed per second) for value of type "string": cannot convert value to numeric type
                                error reason for "database.excelliance.net:mysql.ping["{$MYSQL.HOST}","{$MYSQL.PORT}"]" changed: Item does not allo w parameters.

                                Thanks in advance !
                                Please, use the last version https://git.zabbix.com/projects/ZBX/...Frelease%2F4.4

                                Comment

                                Working...