blob: 4c126b5f20a04c3be3dd927b72a89e0a9e7c0317 [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:
98 group_by: ['alertname', 'region', 'service']
99 group_wait: 60s
100 group_interval: 5m
101 repeat_interval: 3h
102 receiver: HTTP-notification
103 inhibit_rules:
104 - source_match:
105 severity: 'down'
106 target_match:
107 severity: 'critical'
108 equal: ['region', 'service']
109 - source_match:
110 severity: 'down'
111 target_match:
112 severity: 'warning'
113 equal: ['region', 'service']
114 - source_match:
115 severity: 'critical'
116 target_match:
117 severity: 'warning'
118 equal: ['alertname', 'region', 'service']
119 receivers:
120 - name: 'HTTP-notification'
121 webhook_configs:
122 - url: http://127.0.0.1
123 send_resolved: true
124
125Configure pushgateway
126---------------------
127
128.. code-block:: yaml
129
130 prometheus:
131 pushgateway:
132 enabled: true
133 external_port: 15012
134
Filip Pytloun1ff45e82017-02-20 17:49:04 +0100135Documentation and Bugs
136======================
137
138To learn how to install and update salt-formulas, consult the documentation
139available online at:
140
141 http://salt-formulas.readthedocs.io/
142
143In the unfortunate event that bugs are discovered, they should be reported to
144the appropriate issue tracker. Use Github issue tracker for specific salt
145formula:
146
147 https://github.com/salt-formulas/salt-formula-logrotate/issues
148
149For feature requests, bug reports or blueprints affecting entire ecosystem,
150use Launchpad salt-formulas project:
151
152 https://launchpad.net/salt-formulas
153
154You can also join salt-formulas-users team and subscribe to mailing list:
155
156 https://launchpad.net/~salt-formulas-users
157
158Developers wishing to work on the salt-formulas projects should always base
159their work on master branch and submit pull request against specific formula.
160
161 https://github.com/salt-formulas/salt-formula-logrotate
162
163Any questions or feedback is always welcome so feel free to join our IRC
164channel:
165
166 #salt-formulas @ irc.freenode.net