Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jan 2021 22:57:23 +1100
From:      Scott <>
Subject:   Need help specifying args in rc.conf for a service
Message-ID:  <X/w9IwVAFXyDr/>

Next in thread | Raw E-Mail | Index | Archive | Help
Hi all,

I posted this on the forums and was unsuccessful so I thought I'd try here:

I've been struggling to pass additional arguments to the Prometheus 
node_exporter daemon in /etc/rc.conf.

The help for node_exporter provides an example argument (mount points to 
ignore) as:

                                Regexp of mount points to ignore for filesystem collector.

The rc script says to use the _args variable to specify arguments to 
# node_exporter_args (string):          Set extra arguments to pass to 
# Default is "".

Adding the line:


to /etc/rc.conf and running sh -x /usr/local/etc/rc.d/node_exporter start 
results in:

+ limits -C daemon su -m nobody -c 'sh -c "/usr/sbin/daemon  -f -p /var/run/ -T node_exporter     /usr/bin/env /usr/local/bin/node_exporter     --web.listen-address=:9100     --collector.filesystem.ignored-mount-points="^/(dev)($|/)""'
Illegal variable name.

It was suggested on the forum to try:
# OR

However with the first suggestion I got:
limits -C daemon su -m nobody -c 'sh -c "/usr/sbin/daemon  -f -p /var/run/ -T node_exporter     /usr/bin/env /usr/local/bin/node_exporter     --web.listen-address=:9100     --collector.filesystem.ignored-mount-points="^/(dev)(\$|/)""'
Badly placed (.

and with the second I got:
eval $' limits -C daemon su -m nobody -c \'sh -c "/usr/sbin/daemon  -f -p /var/run/ -T node_exporter     /usr/bin/env /usr/local/bin/node_exporter     --web.listen-address=:9100     --collector.filesystem.ignored-mount-points=\'^/(dev)($|/)\'"\''
eval: 1: Syntax error: "(" unexpected

Can anyone please help?


Want to link to this message? Use this URL: <>