| {%- if pillar.reclass is defined %} |
| {%- if pillar.reclass.get('storage', {}).get('enabled', False) and pillar.reclass.get('storage', {}).get('data_source',{}).get('engine',"") == "local" %} |
| |
| reclass_monitor_telegraf_script: |
| file.managed: |
| - name: /usr/local/bin/reclass_monitor.py |
| - source: salt://telegraf/files/script/reclass_monitor.py |
| - template: jinja |
| - mode: 755 |
| |
| {%- endif %} |
| {%- endif %} |
| |
| {%- if pillar.neutron is defined %} |
| {%- for component in ['gateway', 'compute'] %} |
| {%- set neutron_config = pillar.neutron.get(component, {}) %} |
| {%- if neutron_config.get('enabled', False) == True and 'ovs' in neutron_config.get('backend', {}).get('mechanism', {}).keys() %} |
| ovs_parse_bridge: |
| file.managed: |
| - name: /usr/local/bin/ovs_parse_bridge.py |
| - source: salt://telegraf/files/script/ovs_parse_bridge.py |
| - template: jinja |
| - mode: 750 |
| |
| {%- if pillar.neutron.get('gateway', {}).get('enabled', False) == True or pillar.neutron.get('compute',{}).get('dhcp_agent_enabled', False) == True %} |
| ovs_arping_check_telegraf_script: |
| file.managed: |
| - name: /usr/local/bin/check_ovs_arping.py |
| - source: salt://telegraf/files/script/check_ovs_arping.py |
| - template: jinja |
| - mode: 750 |
| |
| {%- endif %} |
| {%- endif %} |
| {%- endfor %} |
| {%- endif %} |
| |
| {%- if pillar.opencontrail is defined %} |
| {%- if pillar.opencontrail.get('compute', {}).get('enabled', False) == True %} |
| {%- set prometheus_address = pillar._param.stacklight_monitor_address %} |
| |
| opencontrail_ping_check_telegraf_script: |
| file.managed: |
| - name: /usr/local/bin/check_opencontrail_ping.py |
| - source: salt://telegraf/files/script/check_opencontrail_ping.py |
| - template: jinja |
| - mode: 750 |
| |
| {%- endif %} |
| {%- endif %} |