prometheus-node-exporter-lua: switch config to openwrt interface names

Drop the config knob 'listen_address' and introduce 'listen_interface'
and 'listen_ipv6' instead.

'listen_interface' takes an openwrt interface name ('loopback', 'lan',
'wan' etc, or "*" for all), from which the primary IP is used to listen
on. If 'listen_ipv6' is set to '1', the IPv6 adress will be used, IPv4
elsewise.

procd interface triggers are now combined with this, so if the listen
interface is not yet configured when the init script is executed, the
process start is defered, and the trigger takes care of that once
the interface is ready.

Fixes #7670

Signed-off-by: Andre Heider <a.heider@gmail.com>
(cherry picked from commit 48568ad9f9)
This commit is contained in:
Andre Heider
2018-12-23 11:43:25 +01:00
committed by Etienne Champetier
parent 41503554d0
commit ee353e6036
2 changed files with 39 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
config prometheus-node-exporter-lua 'main'
option listen_address '::1'
option listen_interface 'loopback'
option listen_ipv6 '0'
option listen_port '9100'