Ad Widget

Collapse

No MySQL data

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kiminox
    Junior Member
    • Jan 2025
    • 4

    #1

    No MySQL data


    Hello,

    I installed Zabbix server 7 on my Ubuntu Server 192.168.0.38: it works fine and I can see data about this "Zabbix server" when logging to web interface


    Then, I created MySQL zabbix user to monitor MySQL server with :
    Code:
    CREATE USER 'zbx_monitor'@'%' IDENTIFIED BY '<password>';
    GRANT REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO 'zbx_monitor'@'%';
    Then I installed Zabbix agent 2 and configure MySQL file : /etc/zabbix/zabbix_agent2.d/plugins.d/mysql.conf
    Code:
    Plugins.Mysql.Default.Uri=tcp://127.0.0.1:3306
    Plugins.Mysql.Default.User=zbx_monitor
    Plugins.Mysql.Default.Password=password
    Then, I configured the host "Zabbix server" (127.0.0.1:10050) with the template "MySQL by Zabbix agent 2".
    No error message:
    sudo tail -f /var/log/zabbix/zabbix_agent2.log
    2025/01/05 07:46:47.054151 using plugin 'VFSDir' (built-in) providing following interfaces: exporter
    2025/01/05 07:46:47.054168 using plugin 'VfsFs' (built-in) providing following interfaces: exporter
    2025/01/05 07:46:47.054178 using plugin 'WebCertificate' (built-in) providing following interfaces: exporter, configurator
    2025/01/05 07:46:47.054187 using plugin 'WebPage' (built-in) providing following interfaces: exporter, configurator
    2025/01/05 07:46:47.054196 using plugin 'ZabbixAsync' (built-in) providing following interfaces: exporter
    2025/01/05 07:46:47.054206 using plugin 'ZabbixStats' (built-in) providing following interfaces: exporter, configurator
    2025/01/05 07:46:47.054213 lowering the plugin ZabbixSync capacity to 1 as the configured capacity 1000 exceeds limits
    2025/01/05 07:46:47.054222 using plugin 'ZabbixSync' (built-in) providing following interfaces: exporter
    2025/01/05 07:46:47.054316 Plugin communication protocol version is 6.4.0
    2025/01/05 07:46:47.054346 Zabbix Agent2 hostname: [Zabbix server]
    Nor in the log file: /var/log/zabbix/zabbix_server.log

    No error message in the web interface (problems: empty).
    After a couple of hours, still no MySQL data when I display "Graphs": I can see server monitoring data such as bandwith, CPU, hard disk...but empty graphs about MySQL.
    And for triggers:
    MySQL by Zabbix agent 2: MySQL: Service is down : last(/Zabbix server/mysql.ping["{$MYSQL.DSN}","{$MYSQL.USER}","{$MYSQL.PASSWO RD}"])=0
    Unknown
    scope: availability
    Information OK
    MySQL by Zabbix agent 2: MySQL: Version has changed last(/Zabbix server/mysql.version["{$MYSQL.DSN}","{$MYSQL.USER}","{$MYSQL.PASSWO RD}"],#1)<>last(/Zabbix server/mysql.version["{$MYSQL.DSN}","{$MYSQL.USER}","{$MYSQL.PASSWO RD}"],#2) and length(last(/Zabbix server/mysql.version["{$MYSQL.DSN}","{$MYSQL.USER}","{$MYSQL.PASSWO RD}"]))>0
    I think I am close but after a couple of hours of trying, I need help please.
    Thank you

  • Answer selected by kiminox at 18-01-2025, 11:19.
    solution
    Senior Member
    • Jun 2020
    • 269

    Don't complicate things, use macros in the Host.
    Official tutorial for Agent, Agent 2 and ODBC:





    Wellington

    Comment

    • kiminox
      Junior Member
      • Jan 2025
      • 4

      #2
      wouah, nobody had a similar problem??

      Comment

      • solution
        Senior Member
        • Jun 2020
        • 269

        #3
        Don't complicate things, use macros in the Host.
        Official tutorial for Agent, Agent 2 and ODBC:





        Wellington

        Comment

        • kiminox
          Junior Member
          • Jan 2025
          • 4

          #4
          Hello, thank you for your reply. That works now, great!
          PB SOLVED!

          Comment

          • kiminox
            Junior Member
            • Jan 2025
            • 4

            #5
            Have a look :
            Click image for larger version

Name:	image.png
Views:	115
Size:	153.5 KB
ID:	497110

            Comment

            Working...