Made this script which will ping alertmanager any time a runner spends too long not contacting gitlab-ci.
Needs 3 env variables:
GITLAB_URL- the url to the instance being used excluding the api part, e.ghttps://gitlab.dotmesh.comGITLAB_TOKEN- access token with access to the APIALERTMANAGER_URL- url of the alertmanager instance to ping, excluding the api part
Optional:
ALERTMANAGER_USERNAMEbasic auth username for alertmanagerALERTMANAGER_PASSWORDbasic auth password for alertmanagerTHRESHOLD_BEFORE_ALERT- a golang standard duration string. How long between now and the contactedAt time is acceptable? Defaulted to20m.PAUSE- golang standard duration string. Time between checking the api on cycle. Defaulted to10m.