mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
[chrony] fix whitespace issues
This commit is contained in:
parent
728b105318
commit
89ddacb3c4
1 changed files with 7 additions and 7 deletions
|
@ -61,9 +61,9 @@ if [ "$1" = "autoconf" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
echo 'graph_title Chrony Tracking Stats'
|
echo 'graph_title Chrony Tracking Stats'
|
||||||
echo 'graph_args --base 1000 -l 0'
|
echo 'graph_args --base 1000 -l 0'
|
||||||
echo 'units (seconds,ppm)'
|
echo 'units (seconds,ppm)'
|
||||||
echo 'graph_category time'
|
echo 'graph_category time'
|
||||||
i=0
|
i=0
|
||||||
for a in $fields ; do
|
for a in $fields ; do
|
||||||
|
@ -73,11 +73,11 @@ if [ "$1" = "config" ]; then
|
||||||
echo "$a.label $word$factor)";
|
echo "$a.label $word$factor)";
|
||||||
echo "$a.type GAUGE"
|
echo "$a.type GAUGE"
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# remove non-needed output lines, remove labels, rescale and label values while detecting slow/fast keywords
|
# remove non-needed output lines, remove labels, rescale and label values while detecting slow/fast keywords
|
||||||
"$CHRONYC" tracking | sed -e 1d -e 3d -e "s/.*://" | \
|
"$CHRONYC" tracking | sed -e 1d -e 3d -e "s/.*://" | \
|
||||||
awk -v FAC="$fieldfactors" -v NAM="$fields" \
|
awk -v FAC="$fieldfactors" -v NAM="$fields" \
|
||||||
'BEGIN { split(FAC,factors," "); split(NAM,names," "); }
|
'BEGIN { split(FAC,factors," "); split(NAM,names," ");
|
||||||
{ /slow/ ? SIGN=-1 : SIGN=1 ; print names[NR]".value ",SIGN*$1*factors[NR]}'
|
{ /slow/ ? SIGN=-1 : SIGN=1 ; print names[NR]".value ",SIGN*$1*factors[NR]}'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue