From e766bc6adb2fac0b0a3c5f533d8fce4b2957baec Mon Sep 17 00:00:00 2001 From: mm6021 Date: Fri, 4 Jan 2019 22:48:11 +0000 Subject: [PATCH] Adding text collector for i40e VF stats from node The stats are generated by divingbell job and node-exporter picks the stats from the host file system. Change-Id: I0f73a6f3ca7e9d045832435410933bd630a8c686 --- .../templates/bin/_node-exporter.sh.tpl | 3 +++ prometheus-node-exporter/templates/daemonset.yaml | 10 ++++++++++ prometheus-node-exporter/values.yaml | 2 ++ 3 files changed, 15 insertions(+) diff --git a/prometheus-node-exporter/templates/bin/_node-exporter.sh.tpl b/prometheus-node-exporter/templates/bin/_node-exporter.sh.tpl index 9fb57e373..60ee2cedd 100644 --- a/prometheus-node-exporter/templates/bin/_node-exporter.sh.tpl +++ b/prometheus-node-exporter/templates/bin/_node-exporter.sh.tpl @@ -20,4 +20,7 @@ set -ex exec /bin/node_exporter \ {{ tuple "--collector." .Values.conf.collectors.enable | include "helm-toolkit.utils.joinListWithPrefix" }} \ {{ tuple "--no-collector." .Values.conf.collectors.disable | include "helm-toolkit.utils.joinListWithPrefix" }} \ + {{ if .Values.conf.collectors.textfile.directory }} \ + --collector.textfile.directory={{.Values.conf.collectors.textfile.directory }} \ + {{- end }} --collector.ntp.server={{ .Values.conf.ntp_server_ip }} diff --git a/prometheus-node-exporter/templates/daemonset.yaml b/prometheus-node-exporter/templates/daemonset.yaml index b659ad775..93724cc56 100644 --- a/prometheus-node-exporter/templates/daemonset.yaml +++ b/prometheus-node-exporter/templates/daemonset.yaml @@ -88,6 +88,11 @@ spec: - name: sys mountPath: /host/sys readOnly: true +{{ if .Values.conf.collectors.textfile.directory }} + - name: stats-out + mountPath: {{.Values.conf.collectors.textfile.directory }} + readOnly: true +{{ end }} - name: node-exporter-bin mountPath: /tmp/node-exporter.sh subPath: node-exporter.sh @@ -99,6 +104,11 @@ spec: - name: sys hostPath: path: /sys +{{ if .Values.conf.collectors.textfile.directory }} + - name: stats-out + hostPath: + path: {{.Values.conf.collectors.textfile.directory }} +{{ end }} - name: node-exporter-bin configMap: name: node-exporter-bin diff --git a/prometheus-node-exporter/values.yaml b/prometheus-node-exporter/values.yaml index 7da4104eb..59105125e 100644 --- a/prometheus-node-exporter/values.yaml +++ b/prometheus-node-exporter/values.yaml @@ -154,3 +154,5 @@ conf: - bonding - mountstats disable: + textfile: + directory: /var/log/node-exporter-vfstats