blob: cee3e90c48314a82b7e7b40fbccedaaded1c9f0e [file] [log] [blame]
Filip Pytloun1ff45e82017-02-20 17:49:04 +01001=======================
2Salt Prometheus formula
3=======================
4
5Power your metrics and alerting with a leading open-source monitoring
6solution.
7
Bartosz Kupidura2f703962017-03-09 12:12:27 +01008Sample pillars
9==============
10
11Configure prometheus server
12---------------------------
13
14.. code-block:: yaml
15
16 prometheus:
17 server:
18 enabled: true
19 dir:
Bartosz Kupidura597b0672017-03-29 12:39:52 +020020 config: /srv/volumes/prometheus
Bartosz Kupidura2f703962017-03-09 12:12:27 +010021 config_in_container: /opt/prometheus/config
22 bind:
23 port: 9090
24 address: 0.0.0.0
25 external_port: 15010
26 target:
Bartosz Kupidura86420022017-03-29 19:19:34 +020027 dns:
Martin Polreiche9dc0602017-05-19 14:02:17 +020028 enabled: true
29 endpoint:
30 - name: 'pushgateway'
31 domain:
32 - 'tasks.prometheus_pushgateway'
33 type: A
34 port: 9091
35 - name: 'prometheus'
36 domain:
37 - 'tasks.prometheus_server'
38 type: A
39 port: 9090
Bartosz Kupidura2f703962017-03-09 12:12:27 +010040 kubernetes:
Martin Polreiche9dc0602017-05-19 14:02:17 +020041 enabled: true
42 api_ip: 127.0.0.1
Bartosz Kupidura2f703962017-03-09 12:12:27 +010043 ssl_dir: /opt/prometheus/config
Bartosz Kupidura453e2902017-03-30 15:43:41 +020044 cert_name: prometheus-server.crt
45 key_name: prometheus-server.key
Bartosz Kupidura86420022017-03-29 19:19:34 +020046 etcd:
Martin Polreiche9dc0602017-05-19 14:02:17 +020047 endpoint:
48 scheme: https
49 ssl_dir: /opt/prometheus/config
50 cert_name: prometheus-server.crt
51 key_name: prometheus-server.key
52 member:
53 - host: ${_param:cluster_node01_address}
54 port: ${_param:cluster_node01_port}
55 - host: ${_param:cluster_node02_address}
56 port: ${_param:cluster_node02_port}
57 - host: ${_param:cluster_node03_address}
58 port: ${_param:cluster_node03_port}
Bartosz Kupidura597b0672017-03-29 12:39:52 +020059 recording:
Martin Polreiche9dc0602017-05-19 14:02:17 +020060 instance:fd_utilization:
Bartosz Kupidura597b0672017-03-29 12:39:52 +020061 query: >-
62 process_open_fds / process_max_fds
Bartosz Kupidura2f703962017-03-09 12:12:27 +010063 storage:
64 local:
65 engine: "persisted"
66 retention: "360h"
67 memory_chunks: 1048576
68 max_chunks_to_persist: 524288
69 num_fingerprint_mutexes: 4096
70 alertmanager:
71 notification_queue_capacity: 10000
72 config:
73 global:
74 scrape_interval: "15s"
75 scrape_timeout: "15s"
76 evaluation_interval: "1m"
77 external_labels:
78 region: 'region1'
79
80Configure alertmanager
81----------------------
82
83.. code-block:: yaml
84
85 prometheus:
86 alertmanager:
87 enabled: true
88 dir:
Bartosz Kupidura597b0672017-03-29 12:39:52 +020089 config: /srv/volumes/prometheus
Bartosz Kupidura2f703962017-03-09 12:12:27 +010090 bind:
91 address: 0.0.0.0
92 port: 9093
93 external_port: 15011
94 config:
95 global:
96 resolve_timeout: 5m
97 route:
Ondrej Smola94baab32017-11-20 20:13:20 +010098 group_by: ['region', 'service']
Bartosz Kupidura2f703962017-03-09 12:12:27 +010099 group_wait: 60s
100 group_interval: 5m
101 repeat_interval: 3h
Ondrej Smola94baab32017-11-20 20:13:20 +0100102 receiver: default
103 inhibit_rule:
104 InhibitCriticalWhenDown:
105 enabled: true
106 source_match:
Bartosz Kupidura2f703962017-03-09 12:12:27 +0100107 severity: 'down'
108 target_match:
109 severity: 'critical'
110 equal: ['region', 'service']
Ondrej Smola94baab32017-11-20 20:13:20 +0100111 InhibitWarningWhenDown:
112 enabled: true
113 source_match:
Bartosz Kupidura2f703962017-03-09 12:12:27 +0100114 severity: 'down'
115 target_match:
116 severity: 'warning'
117 equal: ['region', 'service']
Ondrej Smola94baab32017-11-20 20:13:20 +0100118 InhibitWarningWhenCritical:
119 enabled: true
120 source_match:
Bartosz Kupidura2f703962017-03-09 12:12:27 +0100121 severity: 'critical'
122 target_match:
123 severity: 'warning'
Ondrej Smola94baab32017-11-20 20:13:20 +0100124 equal: ['region', 'service']
125 receiver:
126 HTTP-notification:
Bartosz Kupidura2f703962017-03-09 12:12:27 +0100127 webhook_configs:
Ondrej Smola94baab32017-11-20 20:13:20 +0100128 localhost:
129 url: http://127.0.0.1
Bartosz Kupidura2f703962017-03-09 12:12:27 +0100130 send_resolved: true
Ondrej Smola94baab32017-11-20 20:13:20 +0100131 HTTP-slack:
Konstantin Hontar7b14dea2017-09-13 14:43:46 +0300132 slack_configs:
Ondrej Smola94baab32017-11-20 20:13:20 +0100133 slack:
134 api_url: http://127.0.0.1/slack
Konstantin Hontar7b14dea2017-09-13 14:43:46 +0300135 send_resolved: true
Ondrej Smola94baab32017-11-20 20:13:20 +0100136 smtp:
Konstantin Hontar7b14dea2017-09-13 14:43:46 +0300137 email_configs:
Ondrej Smola94baab32017-11-20 20:13:20 +0100138 email:
139 to: test@example.com
Konstantin Hontar7b14dea2017-09-13 14:43:46 +0300140 from: test@example.com
141 smarthost: example.com
142 auth_username: username
143 auth_password: password
144 send_resolved: true
Ondrej Smola94baab32017-11-20 20:13:20 +0100145 #Two endpoints in one receiver
146 Multi-receiver:
147 slack_configs:
148 slack:
149 api_url: http://127.0.0.1/slack
150 send_resolved: true
151 webhook_configs:
152 webhook:
153 url: http://127.0.0.1
154 send_resolved: true
Bartosz Kupidura2f703962017-03-09 12:12:27 +0100155
156Configure pushgateway
157---------------------
158
159.. code-block:: yaml
160
161 prometheus:
162 pushgateway:
163 enabled: true
164 external_port: 15012
165
Filip Pytloun1ff45e82017-02-20 17:49:04 +0100166Documentation and Bugs
167======================
168
169To learn how to install and update salt-formulas, consult the documentation
170available online at:
171
172 http://salt-formulas.readthedocs.io/
173
174In the unfortunate event that bugs are discovered, they should be reported to
175the appropriate issue tracker. Use Github issue tracker for specific salt
176formula:
177
178 https://github.com/salt-formulas/salt-formula-logrotate/issues
179
180For feature requests, bug reports or blueprints affecting entire ecosystem,
181use Launchpad salt-formulas project:
182
183 https://launchpad.net/salt-formulas
184
185You can also join salt-formulas-users team and subscribe to mailing list:
186
187 https://launchpad.net/~salt-formulas-users
188
189Developers wishing to work on the salt-formulas projects should always base
190their work on master branch and submit pull request against specific formula.
191
192 https://github.com/salt-formulas/salt-formula-logrotate
193
194Any questions or feedback is always welcome so feel free to join our IRC
195channel:
196
197 #salt-formulas @ irc.freenode.net