Ad Widget

Collapse

MySql monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hanskind
    Junior Member
    • Jan 2007
    • 1

    #1

    MySql monitoring

    Hello,

    I did enable the mysql UserParameter in zabbix_agentd.conf. I'm getting the following error:

    Parameter [mysql[threads]] is not supported by agent on host [mysql]

    I searched thesde boards, and haven't been able to find a solution, not have I been able to figure out why I'm getting these errors.

    rgds

    Hans Kind
  • phredbroughton
    Junior Member
    • Jan 2007
    • 4

    #2
    MySQL Monitoring

    I had the same problem until I realized that the agent was running as user zabbix and this user did not have rights to execute mysqladmin which these depend on. For my setup it was easier just to run the agent as root since this box is behind several layers of security and not open to the outside world. This can be done in the /etc/init.d script on RedHat and similar linux setups.
    Apparently the agent reports not supported anytime id doesn't have a value to return.
    Once you get the permissions working you can also use the following to check any parameter from the mysqladmin extended-status listing
    Code:
    UserParameter=mysql.extended[*],mysqladmin -uroot extended-status|grep $1|cut -f3 -d"|"|tr -d "\n "
    Running mysqladmin extended-status returns a list of parameters like
    [root@xxx zabbix]# mysqladmin extended-status
    Code:
    [FONT=Courier New]+--------------------------------+-------------+
    | Variable_name                  | Value       |
    +--------------------------------+-------------+
    | Aborted_clients                | 83          |
    | Aborted_connects               | 11905       |
    | Binlog_cache_disk_use          | 0           |
    | Binlog_cache_use               | 0           |
    | Bytes_received                 | 142293275   |
    | Bytes_sent                     | 1619430526  |
    | Com_admin_commands             | 1           |
    | Com_alter_db                   | 0           |
    | Com_alter_table                | 0           |
    | Com_analyze                    | 0           |
    | Com_backup_table               | 0           |
    | Com_begin                      | 0           |
    | Com_change_db                  | 1301782     |[/FONT]
    Substitute any parameter name when creating an item to receive its value
    ie. mysql.extended[Bytes_received]
    the last pipe to tr in the command strips any new-line or space characters and should help prevent issues these can cause with storing as integer values.
    Last edited by phredbroughton; 09-02-2007, 17:12. Reason: Adding info

    Comment

    • Captain_FLAM
      Junior Member
      • Jun 2012
      • 1

      #3
      Thanks you saved my life today !!!

      I know this post is old but it stills comply to the new Zabbix i use (2.0.0)

      Just a little change, cause there is similar results with this grep above :

      Code:
      UserParameter=mysql.extended[*],mysqladmin -uroot extended-status|grep "$1 "|cut -f3 -d"|"|tr -d "\n "
      ( See : "$1 " <-- with space after )

      I don't know if you'll read this one day, but i wish to thanks you many times !!

      Comment

      Working...