diff --git a/roles/edpm_telemetry/defaults/main.yml b/roles/edpm_telemetry/defaults/main.yml index a1ca80f96..a47a4c637 100644 --- a/roles/edpm_telemetry/defaults/main.yml +++ b/roles/edpm_telemetry/defaults/main.yml @@ -43,6 +43,27 @@ edpm_telemetry_image_download_retries: "{{ edpm_download_retries | default(5) }} # list of tripleo telemetry services to stop during EDPM adoption edpm_telemetry_old_tripleo_compute_sevices: - tripleo_ceilometer_agent_compute.service + +# Command options for node_exporter. This can be overridden to enable/disable collectors +# Keep this as a list of strings which will be rendered into the container JSON command. +edpm_telemetry_node_exporter_cmd: + - "--web.disable-exporter-metrics" + - "--collector.systemd" + - "--collector.systemd.unit-include=(edpm_.*|ovs.*|openvswitch|virt.*|rsyslog)\\.service" + - "--no-collector.dmi" + - "--no-collector.entropy" + - "--no-collector.thermal_zone" + - "--no-collector.time" + - "--no-collector.timex" + - "--no-collector.uname" + - "--no-collector.stat" + - "--no-collector.hwmon" + - "--no-collector.os" + - "--no-collector.selinux" + - "--no-collector.textfile" + - "--no-collector.powersupplyclass" + - "--no-collector.pressure" + - "--no-collector.rapl" # Instruction for distribution of container health check scripts edpm_telemetry_healthcheck_sources: ceilometer_agent_compute: ceilometer_agent diff --git a/roles/edpm_telemetry/meta/argument_specs.yml b/roles/edpm_telemetry/meta/argument_specs.yml index 4f92e9362..8c895c05d 100644 --- a/roles/edpm_telemetry/meta/argument_specs.yml +++ b/roles/edpm_telemetry/meta/argument_specs.yml @@ -66,3 +66,10 @@ argument_specs: type: list required: true description: "List of exporters to be deployed in the compute node" + edpm_telemetry_node_exporter_cmd: + type: list + required: false + description: > + List of command-line options passed to the node_exporter container. + Each item should be a single string representing one option/argument. + Override this list to enable/disable collectors or add extra flags. diff --git a/roles/edpm_telemetry/templates/node_exporter.json.j2 b/roles/edpm_telemetry/templates/node_exporter.json.j2 index 9b13922fb..c61e4a781 100644 --- a/roles/edpm_telemetry/templates/node_exporter.json.j2 +++ b/roles/edpm_telemetry/templates/node_exporter.json.j2 @@ -7,25 +7,11 @@ "ports": ["9100:9100"], "command": [ {% if tls_cert_exists|bool %} - "--web.config.file=/etc/node_exporter/node_exporter.yaml", + "--web.config.file=/etc/node_exporter/node_exporter.yaml", {% endif %} - "--web.disable-exporter-metrics", - "--collector.systemd", - "--collector.systemd.unit-include=(edpm_.*|ovs.*|openvswitch|virt.*|rsyslog)\\.service", - "--no-collector.dmi", - "--no-collector.entropy", - "--no-collector.thermal_zone", - "--no-collector.time", - "--no-collector.timex", - "--no-collector.uname", - "--no-collector.stat", - "--no-collector.hwmon", - "--no-collector.os", - "--no-collector.selinux", - "--no-collector.textfile", - "--no-collector.powersupplyclass", - "--no-collector.pressure", - "--no-collector.rapl" +{% for arg in edpm_telemetry_node_exporter_cmd %} + {{ arg | to_json }}{% if not loop.last %},{% endif %} +{% endfor %} ], "net": "host", "environment": {