Drone CI plugins with HTTP-client for AlertManager
2.0K
Creates and removes silences in AlertManager.
create - create silencedelete - remove silenceurls - list of urls to send a requestduration - duration of added silence (only for create action)template - one of the available request body templatesstrict_match - checking for an exact match of all alert conditions (false by default)valid_response_codes - list of expected HTTP response codesheaders - additional request headerscustom_template - arbitrary request body (Jinja syntax with access to environment variables is supported)username/password - credentials for HTTP authorizationskip_verify - disable SSL certificate verification (for self-signed ones)follow_redirects - follow a 301/302 redirecttimeout - maximum time to wait for a response (in seconds)An example of use in a build step for our "typical" container deployment:
- name: add silence
image: osshelp/drone-alertmanager
settings:
urls:
- https://clientname.ossmon.ru/alertmanager
action: create
template: default
duration: 600
job: '^clientname$'
instance: '^server-\w+.+'
<# Deploy steps #>
- name: remove silence
image: osshelp/drone-alertmanager
settings:
urls:
- https://clientname.ossmon.ru/alertmanager
action: delete
when:
status:
- success
- failure
So far, the main and only template.
{
"id": null,
"createdBy": "drone/alertmanager",
"startsAt": "2019-11-14T02:27:07.429780Z",
"endsAt": "2019-11-14T02:29:07.429780Z",
"comment": "Created for build#42 of orgname/reponame, see http://clientname.ossbuild.ru/link/to/build",
"matchers": [
{
"isRegex": true,
"name": "job",
"value": "^clientname$"
},
{
"isRegex": true,
"name": "instance",
"value": "^server-\\w+.+"
}
]
}
Source repository is available at Github here.
GPL3
OSSHelp Team, see https://oss.help
Content type
Image
Digest
sha256:92c51034a…
Size
36.5 MB
Last updated
over 1 year ago
docker pull osshelp/drone-alertmanager