GitLab Runner Droplet Monitor
Monitor Digital Ocean for stale droplets created by GitLab Runner
Configuration
{
"log-dest": "os.Stdout",
"api-key": "",
"threshold": 5400,
"delete-stale": true
}
log-dest
: set to a path to write to a log file, otherwise os.Stdout
api-key
: Digital Ocean Personal Access Token
threshold
: time, in seconds, after which to consider a runner stale
delete-stale
: whether to delete stale runners, in addition to reporting them
A note about threshold
This value needs to be greater than the job timeout specified in your GitLab Runner configuration, otherwise a runner may erroneously be considered stale.
Installation
- 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.
Usage
./glrdomon -config config.json
-config
: specify path to config file, otherwise assumes ./config.json
relative to the binary