server: bkctld-check-setup - Check how many inc operations are running
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
Ok if there's none or one Critical if theres more than one
This commit is contained in:
parent
457a4ddcda
commit
8147ba84ee
1 changed files with 15 additions and 0 deletions
|
@ -76,6 +76,21 @@ else
|
|||
[ "${return}" -le 2 ] && return=2
|
||||
fi
|
||||
|
||||
# Check if there is no more than one inc running
|
||||
nb_inc_running=$(pgrep --count bkctld-inc)
|
||||
if [ "${nb_inc_running}" -eq 0 ]; then
|
||||
output="${output}OK - no inc operations currently running.\n"
|
||||
nb_ok=$((nb_ok + 1))
|
||||
elif [ "${nb_inc_running}" -eq 1 ]; then
|
||||
output="${output}OK - one inc operation currently running.\n"
|
||||
nb_ok=$((nb_ok + 1))
|
||||
else
|
||||
output="${output}CRITICAL - ${nb_inc_running} inc operations currently running (should be 1 or 0)\n"
|
||||
nb_crit=$((nb_crit + 1))
|
||||
[ "${return}" -le 2 ] && return=2
|
||||
fi
|
||||
|
||||
|
||||
[ "${return}" -ge 0 ] && header="OK"
|
||||
[ "${return}" -ge 1 ] && header="WARNING"
|
||||
[ "${return}" -ge 2 ] && header="CRITICAL"
|
||||
|
|
Loading…
Add table
Reference in a new issue