Skip to content
Snippets Groups Projects
Commit 61f9988a authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update check script

parent cc1fd098
No related branches found
No related tags found
1 merge request!278OP#7546 Icinga Check für ablaufende Gitlab tokens https://projects.iml.unibe.ch/work_packages/7546
...@@ -21,9 +21,6 @@ export self_APPVERSION=0.1 ...@@ -21,9 +21,6 @@ export self_APPVERSION=0.1
GITLAB_API='https://gitlab.example.com/api/v4' GITLAB_API='https://gitlab.example.com/api/v4'
GITLAB_TOKEN='glpat-12345678' 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 GITLAB_CONFIG=/etc/icinga2/gitlab.cfg
REST_CLIENT="$( dirname $0 )/../inc/rest-api-client.sh" REST_CLIENT="$( dirname $0 )/../inc/rest-api-client.sh"
...@@ -33,8 +30,8 @@ typeset -i iTokensFound ...@@ -33,8 +30,8 @@ typeset -i iTokensFound
NL=" NL="
" "
typeset -i iWarnLimit=300 typeset -i iWarnLimit=30
typeset -i iCriticalLimit=200 typeset -i iCriticalLimit=10
typeset -i iCountWarn=0 typeset -i iCountWarn=0
typeset -i iCountCritical=0 typeset -i iCountCritical=0
...@@ -218,7 +215,12 @@ do ...@@ -218,7 +215,12 @@ do
fi fi
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 done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment