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!
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!
Comment