title: Change address where Prometheus node exporter listens in systemd drop-in unit
body: <p>I have a this drop-in unit:</p>
  
  <pre><code># /etc/systemd/system/prometheus-node-exporter.service.d/override.conf
  [Service]
  Environment=ARGS=--web.listen-address=localhost:9101
  </code></pre>
  
  <p>It is relative to this unit from Debian package <code>prometheus-node-exporter</code> (<code>stretch-backports</code> version):</p>
  
  <pre><code># /lib/systemd/system/prometheus-node-exporter.service
  [Unit]
  Description=Prometheus exporter for machine metrics
  Documentation=https://github.com/prometheus/node_exporter
  
  [Service]
  Restart=always
  User=prometheus
  EnvironmentFile=/etc/default/prometheus-node-exporter
  ExecStart=/usr/bin/prometheus-node-exporter $ARGS
  ExecReload=/bin/kill -HUP $MAINPID
  TimeoutStopSec=20s
  SendSIGKILL=no
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p><code>/etc/default/prometheus-node-exporter</code> sets <code>ARGS=""</code>, i.e. the node exporter's default port 9100 applies. The drop-in is meant to change this to 9101 and let the service listen only on <code>localhost</code>.</p>
  
  <p>After <code>systemctl start prometheus-node-exporter</code> the service listens on <code>:::9100</code> (<code>tcp6</code>). However, if I comment-out <code>EnvironmentFile</code> in the unit file it listens on <code>127.0.0.1:9101</code> (<code>tcp</code>), as I want it to. So it seems as if <code>EnvironmentFile</code> from the unit keeps precedence over <code>Environment</code> in the drop-in unit. </p>
  
  <p>Why does the drop-in not override the unit in choosing the value of <code>ARGS</code>? What am I missing and can I change the default listening address with a custom drop-in unit?</p>