Ad Widget

Collapse

zabbix 2.0.5 and default mysql template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghillan
    Junior Member
    • Jan 2012
    • 20

    #1

    zabbix 2.0.5 and default mysql template

    Hello,
    im triing to use the defualt template that come with this zabbix version but all i get its a bunch of "ZBX_NOTSUPPORTED"

    looking at that template those connect to the agent and ask for those following keys:

    MySQL insert operations per second mysql.status[Com_insert]
    MySQL commit operations per second mysql.status[Com_commit]
    MySQL begin operations per second mysql.status[Com_begin]
    MySQL bytes sent per second mysql.status[Bytes_sent]
    MySQL status mysql.ping
    MySQL bytes received per second mysql.status[Bytes_received]
    MySQL delete operations per second mysql.status[Com_delete]
    MySQL rollback operations per second mysql.status[Com_rollback]
    MySQL slow queries mysql.status[Slow_queries]
    MySQL uptime mysql.status[Uptime]
    MySQL queries per second mysql.status[Questions]
    MySQL update operations per second mysql.status[Com_update]
    MySQL select operations per second mysql.status[Com_select]
    MySQL version mysql.version

    But there are no sign about those keys in the documentation. My guess is that i have to edit zabbix_agentd.conf to add those key with user parameter feature, but i could not find any post that tells me exactly what to add. Some of those data should be quite easy to retrieve ( using mysqladmin), but some other i have no idea how to recreate. Do someone know exactly what to add?

    tnx in advance
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    There is an included conf file - userparameter_mysql.conf
    The part that addresses your keys above, is this:

    Code:
    # For all the following commands HOME should be set to the directory that has .my.cnf file with password information.
    
    # Flexible parameter to grab global variables. On the frontend side, use keys like mysql.status[Com_insert].
    # Key syntax is mysql.status[variable].
    UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | HOME=/data/mysql/zabbix mysql -N | awk '{print $$2}'
    You need to make sure your HOME path is set correctly.

    On my Zabbix DB server I have that conf file in the same directory as my zabbix_agentd.conf file.

    Then also, in your zabbix_agentd.conf file, be sure you are including the userparameter_mysql.conf file in the "Include" statement as seen here:

    Code:
    ### Option: Include
    #       You may include individual files or all files in a directory in the configuration file.
    #       Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
    #
    # Mandatory: no
    # Default:
    # Include=
    
    # Include=/usr/local/etc/zabbix_agentd.userparams.conf
    # Include=/usr/local/etc/zabbix_agentd.conf.d/
    Include=/usr/local/etc/userparameter_mysql.conf
    When you make changes to your zabbix_agentd.conf file, be sure to restart your agent process.

    Comment

    • ghillan
      Junior Member
      • Jan 2012
      • 20

      #3
      Found that file!
      Many thanks.

      Comment

      • brenno
        Junior Member
        • Jan 2013
        • 23

        #4
        Originally posted by ghillan
        Found that file!
        Many thanks.
        Here not due right, keeps saying that does not support mysql.

        * Can anyone help me?

        Comment

        • Spoonman
          Member
          • Aug 2013
          • 45

          #5
          Originally posted by tchjts1

          You need to make sure your HOME path is set correctly.
          ....how can I check this ? What is my home path in CentOS 6.4 with ZABBIX 2.0.8 ?

          Comment

          • tchjts1
            Senior Member
            • May 2008
            • 1605

            #6
            Originally posted by Spoonman
            ....how can I check this ? What is my home path in CentOS 6.4 with ZABBIX 2.0.8 ?
            "For all the following commands HOME should be set to the directory that has .my.cnf file with password information."

            Where is your my.cnf file located? That is your HOME path.

            Comment

            • Spoonman
              Member
              • Aug 2013
              • 45

              #7
              Originally posted by tchjts1
              "For all the following commands HOME should be set to the directory that has .my.cnf file with password information."

              Where is your my.cnf file located? That is your HOME path.
              Got it ! Thanks...

              Comment

              Working...