~canonical-is-sa/charms/trusty/prometheus-alertmanager/layer-prometheus-alertmanager

« back to all changes in this revision

Viewing changes to config.yaml

  • Committer: JuanJo Ciarlante
  • Date: 2016-03-14 00:54:44 UTC
  • Revision ID: jjo@canonical.com-20160314005444-14leab47ui9zib1m
[jjo] commit working alertmanager-layer, using 'prometheus-alertmanager' package
* provides 'alertmanager-service', to be able to relate with prometheus
* simple settings to route critical|pager alerts to:
  - pagerduty
  - slack
  - (generic) webhook
* extra_routes and extra_receivers settings to add arbitrary rules
* 'external_url' setting to tweak URL sent in alerts, etc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
options:
 
2
  port:
 
3
    type: int
 
4
    default: 9093
 
5
    description: "Alertmanager listening port"
 
6
  install_sources:
 
7
    default: '[ "ppa:canonical-bootstack/prometheus" ]'
 
8
    type: string
 
9
    description: |
 
10
        YAML list of additional installation sources, as a string. The number of
 
11
        install_sources must match the number of install_keys. For example:
 
12
          install_sources: |
 
13
           - ppa:project1/ppa
 
14
           - ppa:project2/ppa
 
15
  install_keys:
 
16
    default: ""
 
17
    type: string
 
18
    description: |
 
19
        YAML list of GPG keys for installation sources, as a string. For apt repository
 
20
        URLs, use the public key ID used to verify package signatures. For 
 
21
        other sources such as PPA, use empty string. This list must have the 
 
22
        same number of elements as install_sources, even if the key items are 
 
23
        all empty string. An example to go with the above for install_sources:
 
24
          install_keys: |
 
25
           - "ABC"
 
26
           - ""
 
27
 
 
28
  external_url:
 
29
    default: ""
 
30
    type: string
 
31
    description: |
 
32
        The URL under which Alertmanager is externally reachable (for
 
33
        example, if Alertmanager is served via a reverse proxy). Used
 
34
        for generating relative and absolute links back to Alertmanager
 
35
        itself. If the URL has a path portion, it will be used to prefix
 
36
        all HTTP endpoints served by Alertmanager. If omitted, relevant
 
37
        URL components will be derived automatically.
 
38
        It's templatized to accept the following vars: {private_address},
 
39
        {public_address}, {port}, thus you can use e.g.:
 
40
        juju set alertmanager external_url="http://{private_address}:{port}/"
 
41
 
 
42
  repeat_interval:
 
43
    default: "30m"
 
44
    type: string
 
45
    description: |
 
46
        If an alert has successfully been sent, wait 'repeat_interval' to
 
47
        resend them.
 
48
 
 
49
  smtp_smarthost:
 
50
    default: 'localhost:25'
 
51
    type: string
 
52
    description: "SMTP relay"
 
53
 
 
54
  smtp_from:
 
55
    default: 'root@localhost'
 
56
    type: string
 
57
    description: "SMTP from"
 
58
 
 
59
  smtp_to:
 
60
    default: 'root@localhost'
 
61
    type: string
 
62
    description: "Default email recipient for all alerts"
 
63
 
 
64
  enable_pagerduty:
 
65
    default: False
 
66
    type: boolean
 
67
    description: "Enable PagerDuty notifications for critical alerts"
 
68
 
 
69
  pagerduty_url:
 
70
    default: ""
 
71
    type: string
 
72
    description: "Override default, use default from alertmanager ( global.pagerduty_url) if unset"
 
73
 
 
74
  pagerduty_service_key:
 
75
    type: string
 
76
    description: "PagerDuty service key"
 
77
    default: ""
 
78
 
 
79
  enable_slack:
 
80
    default: False
 
81
    type: boolean
 
82
    description: "Enable Slack.com notifications for critical alerts, requires slack_api_url and slack_channel to be set"
 
83
 
 
84
  slack_api_url:
 
85
    default: ""
 
86
    type: string
 
87
    description: "Your slack.com Webhook URL, see https://api.slack.com/incoming-webhooks (required)"
 
88
 
 
89
  slack_channel:
 
90
    default: ""
 
91
    type: string
 
92
    description: "slack channel (required)"
 
93
 
 
94
  enable_webhook:
 
95
    default: False
 
96
    type: boolean
 
97
    description: "Enable generic webhook receiver for critical alerts"
 
98
 
 
99
  webhook_url:
 
100
    default: ""
 
101
    type: string
 
102
    description: "Your webhook url"
 
103
 
 
104
  extra_routes:
 
105
    type: string
 
106
    description: "YAML string containing a list of alertmanager 'routes' to add"
 
107
    default: ""
 
108
 
 
109
  extra_receivers:
 
110
    type: string
 
111
    description: "YAML string containing a list of alertmanager 'receivers' to add"
 
112
    default: ""