Vladislav Naumov | fe2c0aa | 2017-08-30 19:31:15 +0300 | [diff] [blame] | 1 | classes: |
| 2 | - system.postgresql.client |
| 3 | parameters: |
| 4 | _param: |
| 5 | alertmanager_db_host: ${_param:haproxy_postgresql_bind_host} |
| 6 | alertmanager_db_user: alertmanager |
| 7 | alertmanager_db_user_password: alertmanager |
| 8 | webhook_login_id: 13 |
| 9 | webhook_application_id: 24 |
| 10 | postgresql: |
| 11 | client: |
| 12 | server: |
| 13 | server01: |
| 14 | database: |
| 15 | alertmanager: |
| 16 | enabled: true |
| 17 | encoding: 'UTF8' |
| 18 | locale: 'en_US' |
| 19 | users: |
| 20 | - name: ${_param:alertmanager_db_user} |
| 21 | password: ${_param:alertmanager_db_user_password} |
| 22 | host: ${_param:alertmanager_db_host} |
| 23 | createdb: true |
| 24 | rights: all privileges |
| 25 | init: |
| 26 | maintenance_db: pushkin |
| 27 | force: true |
| 28 | queries: |
| 29 | - INSERT INTO login VALUES (${_param:webhook_login_id}, ${_param:webhook_application_id}) ON CONFLICT (id) DO UPDATE SET id = excluded.id; |
| 30 | - INSERT INTO device VALUES (${_param:webhook_application_id}, ${_param:webhook_login_id}, 42, 'stacklight_alertmanager', NULL, 1, NULL) ON CONFLICT (id) DO UPDATE SET id = excluded.id; |