Fix privileges elevations with sudo for mysqladmin_status

tags/smeserver-zabbix-agent-0.4.3-1
Daniel Berteaud 12 years ago
parent 4c55c84992
commit 6d0aa9f24b
  1. 10
      root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf.d/mysql.conf/10All
  2. 2
      root/var/lib/zabbix/bin/check_mysqladmin_status_sudo

@ -7,9 +7,9 @@
# Unit: <depend on the key> (for example, qps) # Unit: <depend on the key> (for example, qps)
# Use multiplier: do not use # Use multiplier: do not use
# Store Value: As is # Store Value: As is
UserParameter=mysql.uptime,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f2 UserParameter=mysql.uptime,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f2
UserParameter=mysql.threads,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f5 UserParameter=mysql.threads,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f5
UserParameter=mysql.questions,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f8 UserParameter=mysql.questions,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f8
UserParameter=mysql.slowqueries,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f12 UserParameter=mysql.slowqueries,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f12
UserParameter=mysql.qps,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f29 UserParameter=mysql.qps,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f29

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
HOME=/root HOME=/root
exec /usr/bin/sudo /usr/bin/mysqladmin status exec /usr/bin/mysqladmin status

Loading…
Cancel
Save