blob: 0dbf2382d16312751f067756d52d7b0203943475 [file] [log] [blame]
{%- if pillar.nova.compute is defined %}
local_plugin:
nova_compute_libvirt:
plugin: libvirt
template: nova/files/collectd_libvirt.conf
nova_libvirt_check:
plugin: python
template: nova/files/collectd_libvirt_check.conf
{%- endif %}
{%- if pillar.nova.controller is defined %}
{% from "nova/map.jinja" import controller with context %}
{%- if controller.get('enabled', False) %}
local_plugin:
collectd_check_local_endpoint:
endpoint:
nova-api:
expected_code: 200
url: "http://{{ controller.bind.private_address|replace('0.0.0.0', '127.0.0.1') }}:8774/"
remote_plugin:
nova_resources:
plugin: python
template: nova/files/collectd_openstack_nova.conf
url: "http://{{ controller.identity.host }}:{{ controller.identity.port }}/v{% if controller.identity.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
project: {{ controller.identity.tenant }}
user: {{ controller.identity.user }}
password: {{ controller.identity.password }}
region: {{ controller.identity.region }}
nova_services:
plugin: python
template: nova/files/collectd_openstack_nova_services.conf
url: "http://{{ controller.identity.host }}:{{ controller.identity.port }}/v{% if controller.identity.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
project: {{ controller.identity.tenant }}
user: {{ controller.identity.user }}
password: {{ controller.identity.password }}
region: {{ controller.identity.region }}
nova_hypervisor_stats:
plugin: python
template: nova/files/collectd_hypervisor_stats.conf
url: "http://{{ controller.identity.host }}:{{ controller.identity.port }}/v{% if controller.identity.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
project: {{ controller.identity.tenant }}
user: {{ controller.identity.user }}
password: {{ controller.identity.password }}
region: {{ controller.identity.region }}
cpu_allocation_ratio: {{ controller.cpu_allocation_ratio }}
{%- endif %}
{%- endif %}