diff --git a/check_journallog b/check_journallog index 5f85292202c2d37d59fabf6dd4d17697b432218c..15e76b784f38dbdc6a62b4829b63e70073d1ca3a 100755 --- a/check_journallog +++ b/check_journallog @@ -5,6 +5,7 @@ # # requirements: # - journalctl +# - sudo permissions to journalctl to fetch all lines of all units # # ---------------------------------------------------------------------- # 2023-10-12 v0.1 <axel.hahn@unibe.ch> initial version @@ -89,7 +90,7 @@ if [ -z "$lastLine" ]; then else ts=$( cut -f 1-3 -d " " <<< "$lastLine" ) typeset -i iAge; iAge=$( ph.getFileAge "$tmpfile" ) - data=$( journalctl --since "$ts" ) + data=$( sudo journalctl --since "$ts" ) # for next run: insert last handled line tail -1 <<< "$data" > "$tmpfile" @@ -119,7 +120,7 @@ else test $iCriticalLimit -gt 0 || sLimits+="No critical level " echo "Limits: $sLimits" - # echo "Found $iLines new line(s) in the last $iAge sec" + echo "Raw data: Found $iLines new line(s) in the last $iAge sec" fi