| {%- load_yaml as base_defaults %} |
| default: |
| pkgs: |
| - influxdb |
| service: influxdb |
| service_user: influxdb |
| service_group: influxdb |
| container_mode: false |
| prefix_dir: / |
| reporting_disabled: true |
| http: |
| enabled: true |
| bind: |
| address: 0.0.0.0 |
| port: 8086 |
| log_enabled: false |
| udp: |
| enabled: false |
| bind: |
| address: 0.0.0.0 |
| port: 9096 |
| admin: |
| enabled: true |
| bind: |
| address: 0.0.0.0 |
| port: 8083 |
| data: |
| enabled: true |
| dir: '/var/lib/influxdb/data' |
| wal_dir: '/var/lib/influxdb/wal' |
| query_log_enabled: false |
| max_series_per_database: 1000000 |
| meta: |
| enabled: true |
| dir: '/var/lib/influxdb/meta' |
| {%- endload %} |
| |
| {%- set server = salt['grains.filter_by'](base_defaults, merge=salt['pillar.get']('influxdb:server')) %} |
| |
| {%- set monitoring = salt['grains.filter_by']({ |
| 'default': { |
| 'max_series_percentage': 95, |
| 'http_errors_percentage': 5, |
| 'failed_points_percentage': 5, |
| 'dropped_points_percentage': 5, |
| 'max_relay_buffer_percentage': 80, |
| 'relay_failed_requests_percentage': 5, |
| 'service_failed_warning_threshold_percent': 0.3, |
| 'service_failed_critical_threshold_percent': 0.6, |
| }, |
| }, grain='os_family', merge=salt['pillar.get']('influxdb:monitoring')) %} |
| |
| {%- set client = salt['grains.filter_by']({ |
| 'default': { |
| 'retry': { |
| 'count': 0, |
| 'delay': 0 |
| } |
| }, |
| }, merge=salt['pillar.get']('influxdb:client')) %} |
| |
| {%- set relay = salt['grains.filter_by']({ |
| 'default': { |
| 'pkgs': ['influxdb-relay'], |
| 'service': 'influxdb-relay', |
| 'listen': {}, |
| 'telemetry': {}, |
| }, |
| }, merge=salt['pillar.get']('influxdb:relay')) %} |