use single userparameter line for zabbix

Bug #1278846 reported by richlv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Monitoring Plugins
Triaged
Low
Unassigned

Bug Description

zabbix package currently has 190 userparameter entries like these :

UserParameter=MySQL.Sort-scan,/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh kt
UserParameter=MySQL.slave-stopped,/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh jh

essentially, they all have different keys, then run the same script with a different parameter. these could be collapsed in a single line like this :

UserParameter=mysql.statistics[*],/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh "$1"

note the [*] part after the key - it tells zabbix agent to replace dollarsign-number positional references with item key parameters.

with the current implementation, item keys are like this :
MySQL.Sort-scan
MySQL.slave-stopped

with the single entry, the corresponding keys would be :
mysql.statistics[kt]
mysql.statistics[jh]

additional parameters can be passed as $2, $3 etc and then specified in the key (key[param1, param2, param3...], but that does not seem to be necessary at this time.

note that this will require changing all item keys in the template, too

Tags: zabbix
Revision history for this message
Roman Vynar (roman-vynar) wrote :

It's probably not a good idea as all items need be renamed to mysql.statistics[XX], thus will be shown in Zabbix web panel this way.
It will be difficult to figure out what they are and how the graphs are built.
Do you agree?

Revision history for this message
richlv (rich-hq) wrote :

no, that doesn't have to change item names, it would only change item keys ("technical identifiers") - names can stay as they are.
for example, item names in the template currently are "Free Pages", "Modified Pages" etc - these don't have to be changed

Revision history for this message
Roman Vynar (roman-vynar) wrote :

In triggers, we use those identifiers and it appears that something like mysql.statistics[XX] will be hard to understand if it makes any sense at all. But anyway, triggers have human-readable names.

Changed in percona-monitoring-plugins:
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.