Filip Pytloun | 1ff45e8 | 2017-02-20 17:49:04 +0100 | [diff] [blame] | 1 | ======================= |
| 2 | Salt Prometheus formula |
| 3 | ======================= |
| 4 | |
| 5 | Power your metrics and alerting with a leading open-source monitoring |
| 6 | solution. |
| 7 | |
Bartosz Kupidura | 2f70396 | 2017-03-09 12:12:27 +0100 | [diff] [blame] | 8 | Sample pillars |
| 9 | ============== |
| 10 | |
| 11 | Configure prometheus server |
| 12 | --------------------------- |
| 13 | |
| 14 | .. code-block:: yaml |
| 15 | |
| 16 | prometheus: |
| 17 | server: |
| 18 | enabled: true |
| 19 | dir: |
Bartosz Kupidura | 597b067 | 2017-03-29 12:39:52 +0200 | [diff] [blame] | 20 | config: /srv/volumes/prometheus |
Bartosz Kupidura | 2f70396 | 2017-03-09 12:12:27 +0100 | [diff] [blame] | 21 | config_in_container: /opt/prometheus/config |
| 22 | bind: |
| 23 | port: 9090 |
| 24 | address: 0.0.0.0 |
| 25 | external_port: 15010 |
| 26 | target: |
Bartosz Kupidura | 8642002 | 2017-03-29 19:19:34 +0200 | [diff] [blame] | 27 | dns: |
Martin Polreich | e9dc060 | 2017-05-19 14:02:17 +0200 | [diff] [blame] | 28 | 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 Kupidura | 2f70396 | 2017-03-09 12:12:27 +0100 | [diff] [blame] | 40 | kubernetes: |
Martin Polreich | e9dc060 | 2017-05-19 14:02:17 +0200 | [diff] [blame] | 41 | enabled: true |
| 42 | api_ip: 127.0.0.1 |
Bartosz Kupidura | 2f70396 | 2017-03-09 12:12:27 +0100 | [diff] [blame] | 43 | ssl_dir: /opt/prometheus/config |
Bartosz Kupidura | 453e290 | 2017-03-30 15:43:41 +0200 | [diff] [blame] | 44 | cert_name: prometheus-server.crt |
| 45 | key_name: prometheus-server.key |
Bartosz Kupidura | 8642002 | 2017-03-29 19:19:34 +0200 | [diff] [blame] | 46 | etcd: |
Martin Polreich | e9dc060 | 2017-05-19 14:02:17 +0200 | [diff] [blame] | 47 | 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 Kupidura | 597b067 | 2017-03-29 12:39:52 +0200 | [diff] [blame] | 59 | recording: |
Martin Polreich | e9dc060 | 2017-05-19 14:02:17 +0200 | [diff] [blame] | 60 | instance:fd_utilization: |
Bartosz Kupidura | 597b067 | 2017-03-29 12:39:52 +0200 | [diff] [blame] | 61 | query: >- |
| 62 | process_open_fds / process_max_fds |
Bartosz Kupidura | 2f70396 | 2017-03-09 12:12:27 +0100 | [diff] [blame] | 63 | 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 | |
| 80 | Configure alertmanager |
| 81 | ---------------------- |
| 82 | |
| 83 | .. code-block:: yaml |
| 84 | |
| 85 | prometheus: |
| 86 | alertmanager: |
| 87 | enabled: true |
| 88 | dir: |
Bartosz Kupidura | 597b067 | 2017-03-29 12:39:52 +0200 | [diff] [blame] | 89 | config: /srv/volumes/prometheus |
Bartosz Kupidura | 2f70396 | 2017-03-09 12:12:27 +0100 | [diff] [blame] | 90 | 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 | |
| 125 | Configure pushgateway |
| 126 | --------------------- |
| 127 | |
| 128 | .. code-block:: yaml |
| 129 | |
| 130 | prometheus: |
| 131 | pushgateway: |
| 132 | enabled: true |
| 133 | external_port: 15012 |
| 134 | |
Filip Pytloun | 1ff45e8 | 2017-02-20 17:49:04 +0100 | [diff] [blame] | 135 | Documentation and Bugs |
| 136 | ====================== |
| 137 | |
| 138 | To learn how to install and update salt-formulas, consult the documentation |
| 139 | available online at: |
| 140 | |
| 141 | http://salt-formulas.readthedocs.io/ |
| 142 | |
| 143 | In the unfortunate event that bugs are discovered, they should be reported to |
| 144 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 145 | formula: |
| 146 | |
| 147 | https://github.com/salt-formulas/salt-formula-logrotate/issues |
| 148 | |
| 149 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 150 | use Launchpad salt-formulas project: |
| 151 | |
| 152 | https://launchpad.net/salt-formulas |
| 153 | |
| 154 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 155 | |
| 156 | https://launchpad.net/~salt-formulas-users |
| 157 | |
| 158 | Developers wishing to work on the salt-formulas projects should always base |
| 159 | their work on master branch and submit pull request against specific formula. |
| 160 | |
| 161 | https://github.com/salt-formulas/salt-formula-logrotate |
| 162 | |
| 163 | Any questions or feedback is always welcome so feel free to join our IRC |
| 164 | channel: |
| 165 | |
| 166 | #salt-formulas @ irc.freenode.net |