mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
[cpubyuser] use 'clean_fieldname' instead of incomplete substitution (Closes: #757)
This commit is contained in:
parent
54580bf7a9
commit
78f4e42d21
@ -37,6 +37,8 @@
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
. "$MUNIN_LIBDIR/plugins/plugin.sh"
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -n "$USERS" ]; then
|
||||
echo "yes"
|
||||
@ -54,11 +56,11 @@ if [ "$1" = "config" ]; then
|
||||
echo "graph_vlabel %"
|
||||
echo "graph_scale no"
|
||||
echo "graph_period second"
|
||||
_USERS=${USERS//[-.]/_}
|
||||
_USERS="$(for user in $USERS; do clean_fieldname "$user" | tr '\n' ' '; done)"
|
||||
echo "graph_order $_USERS others"
|
||||
FIRSTUSER=1;
|
||||
for USER in $USERS "others"; do
|
||||
_USER=${USER//[-.]/_}
|
||||
_USER="$(clean_fieldname "$USER")"
|
||||
echo "${_USER}.label $USER"
|
||||
echo "${_USER}.info CPU used by user $USER"
|
||||
echo "${_USER}.type GAUGE"
|
||||
|
Loading…
Reference in New Issue
Block a user