Skip to content
Snippets Groups Projects

OP#7546 Icinga Check für ablaufende Gitlab tokens https://projects.iml.unibe.ch/work_packages/7546

1 file
+ 8
6
Compare changes
  • Side-by-side
  • Inline
+ 8
6
@@ -21,9 +21,6 @@ export self_APPVERSION=0.1
GITLAB_API='https://gitlab.example.com/api/v4'
GITLAB_TOKEN='glpat-12345678'
GITLAB_API='https://git-repo.iml.unibe.ch/api/v4'
GITLAB_TOKEN='glpat-4Lh6j_aJv7b6zVsRxyXF'
GITLAB_CONFIG=/etc/icinga2/gitlab.cfg
REST_CLIENT="$( dirname $0 )/../inc/rest-api-client.sh"
@@ -33,8 +30,8 @@ typeset -i iTokensFound
NL="
"
typeset -i iWarnLimit=300
typeset -i iCriticalLimit=200
typeset -i iWarnLimit=30
typeset -i iCriticalLimit=10
typeset -i iCountWarn=0
typeset -i iCountCritical=0
@@ -218,7 +215,12 @@ do
fi
fi
output+="$sExpire $sStatus $sName $myusername${NL}"
# url of owning group (is that useful?)
sType=$( cut -f 1 -d "_" <<< "$myusername" )s
sId2=$( cut -f 2 -d "_" <<< "$myusername" )
myurl="$GITLAB_API/$sType/$sId2"
output+="$sExpire $sStatus $sName $myusername $myurl${NL}"
done
Loading