blob: 4b6c4bf0b49d253a772a12e77602e5e041437d2f [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:
28 - name: 'pushgateway'
29 domain:
30 - 'tasks.prometheus_pushgateway'
31 type: A
32 port: 9091
33 - name: 'prometheus'
34 domain:
35 - 'tasks.prometheus_server'
36 type: A
37 port: 9090
Bartosz Kupidura2f703962017-03-09 12:12:27 +010038 kubernetes:
Bartosz Kupidura86420022017-03-29 19:19:34 +020039 api_ip: ${_param:kubernetes_control_address}
Bartosz Kupidura2f703962017-03-09 12:12:27 +010040 ssl_dir: /opt/prometheus/config
Bartosz Kupidura453e2902017-03-30 15:43:41 +020041 cert_name: prometheus-server.crt
42 key_name: prometheus-server.key
Bartosz Kupidura86420022017-03-29 19:19:34 +020043 etcd:
Bartosz Kupidura453e2902017-03-30 15:43:41 +020044 scheme: https
45 ssl_dir: /opt/prometheus/config
46 cert_name: prometheus-server.crt
47 key_name: prometheus-server.key
48 member:
49 - host: ${_param:cluster_node01_address}
50 port: ${_param:cluster_node01_port}
51 - host: ${_param:cluster_node02_address}
52 port: ${_param:cluster_node02_port}
53 - host: ${_param:cluster_node03_address}
54 port: ${_param:cluster_node03_port}
Bartosz Kupidura597b0672017-03-29 12:39:52 +020055 recording:
56 - name: 'instance:fd_utilization'
57 query: >-
58 process_open_fds / process_max_fds
Bartosz Kupidura2f703962017-03-09 12:12:27 +010059 alert:
60 PrometheusTargetDown:
61 if: 'up != 1'
62 labels:
63 severity: down
64 annotations:
65 summary: 'Prometheus target down'
66 storage:
67 local:
68 engine: "persisted"
69 retention: "360h"
70 memory_chunks: 1048576
71 max_chunks_to_persist: 524288
72 num_fingerprint_mutexes: 4096
73 alertmanager:
74 notification_queue_capacity: 10000
75 config:
76 global:
77 scrape_interval: "15s"
78 scrape_timeout: "15s"
79 evaluation_interval: "1m"
80 external_labels:
81 region: 'region1'
82
83Configure alertmanager
84----------------------
85
86.. code-block:: yaml
87
88 prometheus:
89 alertmanager:
90 enabled: true
91 dir:
Bartosz Kupidura597b0672017-03-29 12:39:52 +020092 config: /srv/volumes/prometheus
Bartosz Kupidura2f703962017-03-09 12:12:27 +010093 bind:
94 address: 0.0.0.0
95 port: 9093
96 external_port: 15011
97 config:
98 global:
99 resolve_timeout: 5m
100 route:
101 group_by: ['alertname', 'region', 'service']
102 group_wait: 60s
103 group_interval: 5m
104 repeat_interval: 3h
105 receiver: HTTP-notification
106 inhibit_rules:
107 - source_match:
108 severity: 'down'
109 target_match:
110 severity: 'critical'
111 equal: ['region', 'service']
112 - source_match:
113 severity: 'down'
114 target_match:
115 severity: 'warning'
116 equal: ['region', 'service']
117 - source_match:
118 severity: 'critical'
119 target_match:
120 severity: 'warning'
121 equal: ['alertname', 'region', 'service']
122 receivers:
123 - name: 'HTTP-notification'
124 webhook_configs:
125 - url: http://127.0.0.1
126 send_resolved: true
127
128Configure pushgateway
129---------------------
130
131.. code-block:: yaml
132
133 prometheus:
134 pushgateway:
135 enabled: true
136 external_port: 15012
137
Filip Pytloun1ff45e82017-02-20 17:49:04 +0100138Documentation and Bugs
139======================
140
141To learn how to install and update salt-formulas, consult the documentation
142available online at:
143
144 http://salt-formulas.readthedocs.io/
145
146In the unfortunate event that bugs are discovered, they should be reported to
147the appropriate issue tracker. Use Github issue tracker for specific salt
148formula:
149
150 https://github.com/salt-formulas/salt-formula-logrotate/issues
151
152For feature requests, bug reports or blueprints affecting entire ecosystem,
153use Launchpad salt-formulas project:
154
155 https://launchpad.net/salt-formulas
156
157You can also join salt-formulas-users team and subscribe to mailing list:
158
159 https://launchpad.net/~salt-formulas-users
160
161Developers wishing to work on the salt-formulas projects should always base
162their work on master branch and submit pull request against specific formula.
163
164 https://github.com/salt-formulas/salt-formula-logrotate
165
166Any questions or feedback is always welcome so feel free to join our IRC
167channel:
168
169 #salt-formulas @ irc.freenode.net