Mateusz Matuszkowiak | b43f5af | 2018-02-13 14:34:29 +0100 | [diff] [blame] | 1 | classes: |
| 2 | - system.prometheus.alertmanager.container |
| 3 | - system.prometheus.pushgateway.container |
| 4 | - system.prometheus.remote_storage_adapter.container |
| 5 | - system.prometheus.server.container |
| 6 | - system.docker.swarm.stack.monitoring.remote_agent |
| 7 | parameters: |
| 8 | _param: |
| 9 | # Backward compatibility for Prometheus 1.7 |
| 10 | prometheus_storage_local_engine: "persisted" |
| 11 | prometheus_storage_heap_size: 3221225472 |
| 12 | prometheus_storage_num_fingerprint_mutexes: 4096 |
| 13 | |
| 14 | docker: |
| 15 | client: |
| 16 | stack: |
| 17 | monitoring: |
| 18 | network: |
| 19 | monitoring: |
| 20 | driver: overlay |
| 21 | driver_opts: |
| 22 | encrypted: 1 |
| 23 | service: |
| 24 | relay: |
| 25 | networks: |
| 26 | - monitoring |
| 27 | deploy: |
| 28 | replicas: 2 |
| 29 | labels: |
| 30 | com.mirantis.monitoring: "relay" |
| 31 | restart_policy: |
| 32 | condition: any |
| 33 | labels: |
| 34 | com.mirantis.monitoring: "relay" |
| 35 | image: ${_param:docker_image_prometheus_relay} |
| 36 | ports: |
| 37 | - 15016:8080 |
| 38 | environment: |
| 39 | PROMETHEUS_RELAY_DNS: 'tasks.monitoring_server' |
| 40 | remote_storage_adapter: |
| 41 | networks: |
| 42 | - monitoring |
| 43 | deploy: |
| 44 | replicas: 1 |
| 45 | labels: |
| 46 | com.mirantis.monitoring: "remote_storage_adapter" |
| 47 | restart_policy: |
| 48 | condition: any |
| 49 | labels: |
| 50 | com.mirantis.monitoring: "remote_storage_adapter" |
| 51 | image: ${_param:docker_image_remote_storage_adapter} |
| 52 | ports: |
| 53 | - 15015:${prometheus:remote_storage_adapter:bind:port} |
| 54 | environment: |
| 55 | RSA_BIND_PORT: ${prometheus:remote_storage_adapter:bind:port} |
| 56 | RSA_BIND_ADDRESS: ${prometheus:remote_storage_adapter:bind:address} |
| 57 | RSA_INFLUXDB_RETENTION_POLICY: 'lma' |
| 58 | RSA_INFLUXDB_URL: ${_param:prometheus_influxdb_url} |
| 59 | RSA_INFLUXDB_DB: ${_param:prometheus_influxdb_db} |
| 60 | RSA_INFLUXDB_USERNAME: ${_param:prometheus_influxdb_username} |
| 61 | RSA_INFLUXDB_PASSWORD: ${_param:prometheus_influxdb_password} |
| 62 | alertmanager: |
| 63 | networks: |
| 64 | - monitoring |
| 65 | deploy: |
| 66 | replicas: 2 |
| 67 | labels: |
| 68 | com.mirantis.monitoring: "alertmanager" |
| 69 | restart_policy: |
| 70 | condition: any |
| 71 | labels: |
| 72 | com.mirantis.monitoring: "alertmanager" |
| 73 | image: ${_param:docker_image_alertmanager} |
| 74 | ports: |
| 75 | - 15011:${prometheus:alertmanager:bind:port} |
| 76 | volumes: |
| 77 | - ${prometheus:alertmanager:dir:config}:${_param:prometheus_alertmanager_config_directory} |
| 78 | - ${prometheus:alertmanager:dir:data}:${_param:prometheus_alertmanager_data_directory} |
| 79 | environment: |
| 80 | ALERTMANAGER_CONFIG_DIR: ${_param:prometheus_alertmanager_config_directory} |
| 81 | ALERTMANAGER_DATA_DIR: ${_param:prometheus_alertmanager_data_directory} |
| 82 | ALERTMANAGER_BIND_PORT: ${prometheus:alertmanager:bind:port} |
| 83 | ALERTMANAGER_BIND_ADDRESS: ${prometheus:alertmanager:bind:address} |
| 84 | ALERTMANAGER_DISCOVERY_DOMAIN: 'monitoring_alertmanager' |
| 85 | ALERTMANAGER_EXTERNAL_URL: "http://${_param:stacklight_monitor_address}:15011" |
| 86 | pushgateway: |
| 87 | networks: |
| 88 | - monitoring |
| 89 | deploy: |
| 90 | replicas: 2 |
| 91 | labels: |
| 92 | com.mirantis.monitoring: "pushgateway" |
| 93 | restart_policy: |
| 94 | condition: any |
| 95 | environment: |
| 96 | PUSHGATEWAY_BIND_PORT: ${prometheus:pushgateway:bind:port} |
| 97 | PUSHGATEWAY_BIND_ADDRESS: ${prometheus:pushgateway:bind:address} |
| 98 | labels: |
| 99 | com.mirantis.monitoring: "pushgateway" |
| 100 | image: ${_param:docker_image_pushgateway} |
| 101 | ports: |
| 102 | - 15012:${prometheus:pushgateway:bind:port} |
| 103 | server: |
| 104 | networks: |
| 105 | - monitoring |
| 106 | deploy: |
| 107 | mode: global |
| 108 | labels: |
| 109 | com.mirantis.monitoring: "prometheus" |
| 110 | restart_policy: |
| 111 | condition: any |
| 112 | labels: |
| 113 | com.mirantis.monitoring: "prometheus" |
| 114 | image: ${_param:docker_image_prometheus} |
| 115 | ports: |
| 116 | - 15010:${prometheus:server:bind:port} |
| 117 | volumes: |
| 118 | - ${prometheus:server:dir:config}:${_param:prometheus_server_config_directory} |
| 119 | - ${prometheus:server:dir:data}:${_param:prometheus_server_data_directory} |
| 120 | environment: |
| 121 | PROMETHEUS_CONFIG_DIR: ${_param:prometheus_server_config_directory} |
| 122 | PROMETHEUS_DATA_DIR: ${_param:prometheus_server_data_directory} |
| 123 | PROMETHEUS_BIND_PORT: ${prometheus:server:bind:port} |
| 124 | PROMETHEUS_BIND_ADDRESS: ${prometheus:server:bind:address} |
| 125 | PROMETHEUS_STORAGE_LOCAL_RETENTION: ${prometheus:server:storage:local:retention} |
| 126 | PROMETHEUS_EXTERNAL_URL: "http://${_param:stacklight_monitor_address}:15010" |
| 127 | # Backward compatibility for Prometheus 1.7 |
| 128 | PROMETHEUS_STORAGE_LOCAL_ENGINE: ${_param:prometheus_storage_local_engine} |
| 129 | PROMETHEUS_STORAGE_LOCAL_TARGET_HEAP_SIZE: ${_param:prometheus_storage_heap_size} |
| 130 | PROMETHEUS_STORAGE_LOCAL_NUM_FINGERPRINT_MUTEXES: ${_param:prometheus_storage_num_fingerprint_mutexes} |
| 131 | PROMETHEUS_USE_STATIC_DATADIR: "true" |