Monitor Digital Ocean for stale droplets created by GitLab Runner
{
"log-dest": "os.Stdout",
"api-key": "",
"threshold": 5400,
"delete-stale": true
}
log-dest
: set to a path to write to a log file, otherwiseos.Stdout
api-key
: Digital Ocean Personal Access Tokenthreshold
: time, in seconds, after which to consider a runner staledelete-stale
: whether to delete stale runners, in addition to reporting them
This value needs to be greater than the job timeout specified in your GitLab Runner configuration, otherwise a runner may erroneously be considered stale.
- Download the appropriate binary from tagged releases, or build the binary yourself.
- Copy
config-sample.json
to an appropriate location and update the default values as needed. - Create a cron task to periodically run the monitor.
./glrdomon -config config.json
-config
: specify path to config file, otherwise assumes./config.json
relative to the binary