Ad Widget

Collapse

Remote MySQL database query how to in Zabbix 5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rosbif35
    Junior Member
    • Nov 2020
    • 3

    #1

    Remote MySQL database query how to in Zabbix 5

    Apologies if this has been covered, but I have searched and searched and found nothing.

    I have to monitor certain values from a mysql database in CentOS for my client in Zabbix5.

    They previously used ZenOSS and I can see that there is a mysql client that accepts the mysql log in and database and query in that monitoring application.

    If I create the host to monitor in the configuration option, there appears to be no instinctive way of using a remote mysql query to gather data.

    I would also like to graph other mysql values for other hosts.

    I don't want to monitor a database, nor query the local zabbix mysql, but extract values from a remote server without using the zabbix agent on that server

    This is a slightly redacted version of the query i wish to execute

    mysql -u user -pXXXXXX -h 10.0.32.39 -P 3306 -D LOGS -e "SELECT count(*) AS Data_TCAP_Abort FROM tcap_cdr WHERE abort=1 AND date <= NOW()AND date >= NOW() - INTERVAL 5 MINUTE AND (ip_dport = 2915 OR ip_sport = 2915)"

    I can execute this from a remote server, but I am unable to work out how to configure the Zabbix front end to execute it.

    I have also scoured the books on Zabbix from Packt to no avail.
  • rosbif35
    Junior Member
    • Nov 2020
    • 3

    #2
    I have spent more time in the fora, and I think the way forward might be the ODBC plug in, can anyone confirm this? And if so, how the hoolie can I add that facility into an already running Zabbix 5 installation?

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #3
      What's wrong with this?

      On the Zabbix server, you configure ODBC to connect to your database on another server and make requests to it. An agent on a remote server with a database is not required. Nothing superfluous.

      Comment


      • rosbif35
        rosbif35 commented
        Editing a comment
        Thank you. It was the leap from a dedicated mysql access to using the ODBC function. Cracked it now.
    Working...