Re: cephadm node-exporter extra_container_args for textfile_collector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for confirmation - I've ended up just adding the arguments onto the end https://github.com/prometheus/node_exporter/blob/master/Dockerfile#L12 and creating a custom image.


It would be nice to know how to get this request submitted as a feature request or bounty etc

________________________________
From: Wyll Ingersoll <wyllys.ingersoll@xxxxxxxxxxxxxx>
Sent: 28 October 2022 15:19:17
To: Lee Carney; ceph-users@xxxxxxx
Subject: Re: cephadm node-exporter extra_container_args for textfile_collector

I ran into the same issue - wanted to add the textfile.directory to the node_exporter using "extra_container_args" - and it failed just as you describe.  It appears that those args get applied to the container command (podman or docker) and not to the actual service in the container.  Not sure if that is intentional or not, but it would be nice to be able to add args to the process IN the container, especially for the node_exporter so that additional data can be collected.


________________________________
From: Lee Carney <Lee.Carney@xxxxxxxxxxxxxxx>
Sent: Thursday, October 27, 2022 10:27 AM
To: ceph-users@xxxxxxx <ceph-users@xxxxxxx>
Subject:  cephadm node-exporter extra_container_args for textfile_collector

Has anyone had success in using cephadm to add extra_container_args onto the node-exporter config? For example changing the collector config.


I am trying and failing using the following:


1. Create ne.yml

service_type: node-exporter
service_name: node-exporter
placement:
    host_pattern: '*'
extra_container_args:
    - --collector.textfile.directory=/var/lib/node_exporter/textfile_collector


2. cephadm shell --mount ne.yml:/var/lib/ceph/node-exporter/ne.yml

3. ceph orch apply -i '/var/lib/ceph/node-exporter/ne.yml'

4. Service will fail to start as the args have been applied at the beginning of the service config and not at the end..e.g.  cat /var/lib/ceph/a898358c-eeac-11ec-b707-0800279b70f1/node-exporter.node1-cceph1-vagrant-local1/unit.run

/bin/podman run --rm --ipc=host --stop-signal=SIGTERM --net=host --init --name ceph-a898358c-eeac-11ec-b707-0800279b70f1-node-exporter-node1-cceph1-vagrant-local1 --user 65534 --security-opt label=disable -d --log-driver journald --conmon-pidfile /run/ceph-a898358c-eeac-11ec-b707-0800279b70f1@node-exporter.node1-cceph1-vagrant-local1.service-pid --cidfile /run/ceph-a898358c-eeac-11ec-b707-0800279b70f1@node-exporter.node1-cceph1-vagrant-local1.service-cid --cgroups=split --collector.textfile.directory=/var/lib/node_exporter/textfile_collector -e CONTAINER_IMAGE=quay.io/prometheus/node-exporter:v1.3.1 -e NODE_NAME=node1-cceph1-vagrant-local1.dev-globalrelay.net -e CEPH_USE_RANDOM_NONCE=1 -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/rootfs:ro quay.io/prometheus/node-exporter:v1.3.1 --no-collector.timex --web.listen-address=:9100 --path.procfs=/host/proc --path.sysfs=/host/sys --path.rootfs=/rootfs


Looking at the cephadm deployer I had expected the extra args to be added at the end: https://github.com/ceph/ceph/blob/c37bd103033bc0a9f05ec0e78cef7cbca5649eeb/src/cephadm/cephadm#L575 and https://github.com/ceph/ceph/blob/c37bd103033bc0a9f05ec0e78cef7cbca5649eeb/src/cephadm/cephadm#L5761


_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux