I use openstack-helm-infra/prometheus-node-exporter in a kubernetes enviroment.
I want to collector disk info by using smartmon.
So I add a container named 'smartmon-collector' to collector disk info by smartmon.sh.
Ant it will put the file into /var/lib/node-exporter, sharing with node-exporter. I start node-exporter by arg '--collector.textfile.directory=/var/lib/node-exporter'.
But , when I start it, and i entry the smartmon-collector container, the output of smartmon.sh is just as folowing:
smartmon_smartctl_version{nodename="node-3",version="6.2"} 1
Not as much as I run the smartmon.sh script in host.
I execute "smartctl --scan-open" in container, output:
Should I set a volumeMounts like '/sys',"/proc","/dev", or others. How to solve it?
Thank you in advance
I should set a security context for my container.
for docker, i should run with '--privileged'.
for k8s, i should wirte srcurity context as below:
securityContext:
privileged: true
I use openstack-helm-infra/prometheus-node-exporter in a kubernetes enviroment.
I use openstack-helm-infra/prometheus-node-exporter in a kubernetes enviroment.