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