mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 02:18:08 +00:00
systemd: don't print out empty extinfo lines
This fixes warnings like this in munin-update.log: [WARNING] 4 lines had errors while 8 lines were correct (33. 33%) in data from 'fetch systemd'
This commit is contained in:
parent
160bd2f034
commit
7f2ae83eb6
1 changed files with 4 additions and 2 deletions
|
@ -79,8 +79,10 @@ fetch () {
|
|||
$states ; do
|
||||
echo -n "$state.value "
|
||||
grep $state$ $tmp | wc -l
|
||||
echo -n "$state.extinfo "
|
||||
echo $(grep $state$ $tmp | cut -d " " -f 1)
|
||||
extinfo=`grep $state$ $tmp | cut -d " " -f 1`
|
||||
if [ "$extinfo" ]; then
|
||||
echo "$state.extinfo" $extinfo
|
||||
fi
|
||||
done
|
||||
rm $tmp
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue