prometheus: add support for installing webhook server
This commit is contained in:
@@ -51,6 +51,11 @@ argument_specs:
|
||||
type: bool
|
||||
required: false
|
||||
default: true
|
||||
prometheus_install_webhook:
|
||||
description: If true, installs webhook server in the same docker network as prometheus and configures it
|
||||
type: bool
|
||||
required: false
|
||||
default: false
|
||||
|
||||
alertmanager_storage_retention:
|
||||
description: Period of time for which alertmanager data is stored for. A number followed by unit (s, m, h, d, w, y). Passed directly to alertmanager role
|
||||
@@ -58,6 +63,47 @@ argument_specs:
|
||||
required: false
|
||||
default: "{{ prometheus_storage_retention | default('3650d') }}"
|
||||
|
||||
prometheus_webhook_handlers:
|
||||
description: List of webhook server handlers
|
||||
type: list
|
||||
required: "{{ prometheus_install_webhook }}"
|
||||
elements: dict
|
||||
options:
|
||||
id:
|
||||
description: specifies the ID of your hook. This value is used to create the HTTP endpoint
|
||||
type: str
|
||||
required: true
|
||||
execute-command:
|
||||
description: specifies the command that should be executed when the hook is triggered
|
||||
type: str
|
||||
required: true
|
||||
command-working-directory:
|
||||
description: specifies the working directory that will be used for the script when it's executed
|
||||
type: str
|
||||
required: false
|
||||
pass-arguments-to-command:
|
||||
description: >
|
||||
specifies the list of arguments that will be passed to the
|
||||
command. See for more info:
|
||||
https://github.com/adnanh/webhook/blob/master/docs/Referencing-Request-Values.md
|
||||
type: list
|
||||
required: false
|
||||
elements: dict
|
||||
options:
|
||||
source:
|
||||
description: Source of the argument. Use `string` to specify argument here.
|
||||
type: str
|
||||
required: true
|
||||
choices:
|
||||
- string
|
||||
- header
|
||||
- url
|
||||
- request
|
||||
- payload
|
||||
name:
|
||||
description: Argument if source is string, otherwise the source attribute name.
|
||||
type: str
|
||||
required: true
|
||||
|
||||
# All options after this will be passed directly to the container role
|
||||
docker_service_suffix:
|
||||
|
||||
Reference in New Issue
Block a user