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