19. Cookbook --> 2. Monitoring of Specific Applications
2.2 MySQL
This:
SHOULD read:
The REQUIRED change:
UserParameter=mysql[questions]
to
UserParameter=mysql.questions
The currently documented example code does not work, the key syntax is invalid.
Additional Recommended updates:
2.2 MySQL
This:
Code:
### Set of parameter for monitoring MySQL server (v3.23.42 and later) ### Change -u and add -p if required #UserParameter=mysql[ping],mysqladmin -uroot ping|grep alive|wc -l #UserParameter=mysql[uptime],mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" #UserParameter=mysql[threads],mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" #UserParameter=mysql[questions],mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" #UserParameter=mysql[slowqueries],mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" #UserParameter=mysql[qps],mysqladmin -uroot status|cut -f9 -d":" #UserParameter=version[mysql],mysql -V
SHOULD read:
Code:
### Set of parameter for monitoring MySQL server (v3.23.42 and later) ### Change -u and add -p if required #UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l #UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f2 -d" " #UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f2 -d" " #UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f2 -d" " #UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f2 -d" " #UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"|cut -f2 -d" " #UserParameter=mysql.version,mysql -V
The REQUIRED change:
UserParameter=mysql[questions]
to
UserParameter=mysql.questions
The currently documented example code does not work, the key syntax is invalid.
Additional Recommended updates:
I would suggest also changing the contents of the piped `cut` statements as shown. The original returns values with leading and/or trailing whitespace. The revised version returns the same correct values, but without any whitespace.
Comment