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