blob: d0229c5dbe984e62e2b8a9e6c899492020b4e9ed [file] [log] [blame]
{%- if pillar.cinder.controller is defined %}
{%- from "cinder/map.jinja" import controller with context %}
{%- if pillar.cinder.controller.get('enabled', False) %}
local_plugin:
collectd_check_local_endpoint:
endpoint:
cinder-api:
expected_code: {% if controller.version in ('juno', 'kilo', 'liberty') %}200{% else %}300{% endif %}
url: "http://{{ controller.osapi.host|replace('0.0.0.0', '127.0.0.1') }}:8776/"
remote_plugin:
openstack_cinder:
plugin: python
template: cinder/files/collectd_openstack_cinder.conf
url: "http://{{ controller.identity.host }}:{{ controller.identity.port }}/v{% if controller.identity.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
username: {{ controller.identity.user }}
password: {{ controller.identity.password }}
tenant: {{ controller.identity.tenant }}
{%- endif %}
{%- endif %}