bugfix:TSG-15631:修复TSG-X设备发送telegraf device_id错误问题
This commit is contained in:
@@ -571,3 +571,9 @@ enable_breakpad_upload=0
|
||||
- name: dev-shm
|
||||
mountPath: /dev/shm
|
||||
{{- end -}}
|
||||
|
||||
{{- define "traffic-engine.telegraf.read.device-id" -}}
|
||||
export device_id=`ipmitool fru list |grep 'Product Serial' | awk '{ print $4}'`
|
||||
if [ -z "$device_id" ]; then export device_id="unknown"; fi
|
||||
echo "export device_id=${device_id}" > /etc/profile.d/device_id.sh
|
||||
{{- end -}}
|
||||
@@ -99,7 +99,12 @@ spec:
|
||||
- name: telegraf
|
||||
image: "registry.gdnt-cloud.website/tsg-telegraf:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command: ["/usr/bin/telegraf", "-config", "/etc/telegraf/telegraf_statistic.conf", "-config-directory", "/etc/telegraf/telegraf_statistic.d"]
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
{{ template "traffic-engine.telegraf.read.device-id" . }}
|
||||
/usr/bin/telegraf -config /etc/telegraf/telegraf_statistic.conf -config-directory /etc/telegraf/telegraf_statistic.d
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
@@ -117,7 +122,12 @@ spec:
|
||||
- name: telegraf-security
|
||||
image: "registry.gdnt-cloud.website/tsg-telegraf:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command: ["/usr/bin/telegraf", "-config", "/etc/telegraf/telegraf_security.conf", "-config-directory", "/etc/telegraf/telegraf_statistic.d"]
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
{{ template "traffic-engine.telegraf.read.device-id" . }}
|
||||
/usr/bin/telegraf -config /etc/telegraf/telegraf_security.conf -config-directory /etc/telegraf/telegraf_statistic.d
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
|
||||
@@ -141,7 +141,12 @@ spec:
|
||||
- name: telegraf-proxy
|
||||
image: "registry.gdnt-cloud.website/tsg-telegraf:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command: ["/usr/bin/telegraf", "-config", "/etc/telegraf/telegraf_proxy.conf", "-config-directory", "/etc/telegraf/telegraf_statistic.d"]
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
{{ template "traffic-engine.telegraf.read.device-id" . }}
|
||||
/usr/bin/telegraf -config /etc/telegraf/telegraf_proxy.conf -config-directory /etc/telegraf/telegraf_statistic.d
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
|
||||
@@ -131,7 +131,12 @@ spec:
|
||||
- name: telegraf-sce
|
||||
image: "registry.gdnt-cloud.website/tsg-telegraf:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command: ["/usr/bin/telegraf", "-config", "/etc/telegraf/telegraf_sce.conf", "-config-directory", "/etc/telegraf/telegraf_statistic.d"]
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
{{ template "traffic-engine.telegraf.read.device-id" . }}
|
||||
/usr/bin/telegraf -config /etc/telegraf/telegraf_sce.conf -config-directory /etc/telegraf/telegraf_statistic.d
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
|
||||
@@ -104,7 +104,12 @@ spec:
|
||||
- name: telegraf-shaping
|
||||
image: "registry.gdnt-cloud.website/tsg-telegraf:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command: ["/usr/bin/telegraf", "-config", "/etc/telegraf/telegraf_shaping.conf", "-config-directory", "/etc/telegraf/telegraf_statistic.d"]
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
{{ template "traffic-engine.telegraf.read.device-id" . }}
|
||||
/usr/bin/telegraf -config /etc/telegraf/telegraf_shaping.conf -config-directory /etc/telegraf/telegraf_statistic.d
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
|
||||
Reference in New Issue
Block a user