Ad Widget

Collapse

Values of user parameter item key

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hardbone12
    Junior Member
    • Dec 2015
    • 6

    #1

    Values of user parameter item key

    I defined some user parameter item on the zabbix_agent configuration which is monitoring mysql performance

    config:
    #/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf
    UserParameter=mysql.status[*],/etc/zabbix/scripts/check_mysql.sh status $1 $2 $3 $4

    scripts test:
    # /etc/zabbix/scripts/check_mysql.sh status Bytes_received
    115

    zabbix_agentd test:
    # zabbix_agentd -t mysql.status[Bytes_received]
    mysql.status[Bytes_received] [t|115]

    test by server:
    # zabbix_get -s 192.168.1.131 -k mysql.status[Bytes_received]
    115

    It all looks good , But!

    mysql> select itemid,key_,templateid from items where key_ like '%mysql.status[Bytes_received]%';
    +--------+------------------------------+------------+
    | itemid | key_ | templateid |
    +--------+------------------------------+------------+
    | 22830 | mysql.status[Bytes_received] | NULL |
    | 24265 | mysql.status[Bytes_received] | 22830 |
    +--------+------------------------------+------------+
    2 rows in set (0.00 sec)

    mysql> select * from history where itemid like '24265';
    +--------+--------------+--------+-----------+
    | itemid | clock | value | ns |
    +--------+--------------+--------+-----------+

    ***************************************

    | 24265 | 1450943245 | 0.0000 | 512405253 |
    | 24265 | 1450943305 | 0.0000 | 577603448 |
    | 24265 | 1450943365 | 0.0000 | 796966350 |
    | 24265 | 1450943425 | 0.0000 | 15924148 |
    | 24265 | 1450943485 | 0.0000 | 473561877 |
    | 24265 | 1450943545 | 0.0000 | 887326433 |
    | 24265 | 1450943605 | 0.0000 | 18308483 |
    | 24265 | 1450943665 | 0.0000 | 958366846 |
    +--------+--------------+--------+------------+
    158 rows in set (0.21 sec)


    The value is always "0" , The latest on the Web page is the same problem



    Even if the data is very different from the actual

    # zabbix_get -s 192.168.1.131 -k mysql.status[Connections]
    7115



    I have already emptied empty all item of units , still not working


    I would be grateful for any advice!
    Attached Files
  • hardbone12
    Junior Member
    • Dec 2015
    • 6

    #2
    I got the problem.
    I set the Store Value to "speed per second"

    Comment

    • ingus.vilnis
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Mar 2014
      • 908

      #3
      Hello and welcome to Zabbix forums!

      At first glance looks like the problem is with the script.
      /etc/zabbix/scripts/check_mysql.sh

      Zabbix agent by default comes with a bit different approach to MySQL monitoring with built in template for that. It uses internal stats from MySQL itself and so far has been pretty accurate. Have you ever tried that way?

      Best Regards,
      Ingus

      Comment

      Working...