Configuration¶
The exporter supports two methods of configuration:
via environment variable
via config file
Environment variable¶
If you only need a single device this is the easiest way to configure the exporter.
|
|
|
|
Hostname of the device |
fritz.box |
|
Username to authenticate on the device |
none |
|
Password to use for authentication |
none |
|
File to read the password from |
|
|
Address to listen on. Can be IPv4 or IPv6. |
127.0.0.1 |
|
Listening port for the exporter |
9787 |
|
Application log level: |
INFO |
|
Enable extended information about all WiFi hosts. Only “true” or “1” will enable this feature |
False |
Note
enabling FRITZ_HOST_INFO by setting it to true or 1 will collect extended information about every device known your fritz device which can take a long time (20+ seconds). If you really want or need the extended stats please make sure that your Prometheus scraping interval and timeouts are set accordingly.
When using the environment vars you can only specify a single device. If you need multiple devices please use the config file.
Example for a device (at 192.168.178.1 username “monitoring” and the password “mysupersecretpassword”):
export FRITZ_NAME='My Fritz!Box'
export FRITZ_HOSTNAME='192.168.178.1'
export FRITZ_USERNAME='monitoring'
export FRITZ_PASSWORD='mysupersecretpassword'
Config file¶
To use the config file you have to specify the the location of the config and mount the appropriate file into the container. The location can be specified by using the --config parameter.
# Full example config file for Fritz-Exporter
exporter_port: 9787 # optional
log_level: DEBUG # optional
devices:
- name: Fritz!Box 7590 Router # optional
hostname: fritz.box
username: prometheus
password: prometheus
host_info: True
- name: Repeater Wohnzimmer # optional
hostname: repeater-Wohnzimmer
username: prometheus
password_file: /path/to/password.txt
Note
Enabling FRITZ_HOST_INFO by setting it to true or 1 will collect extended information about every device known to your Fritz device, which can take a long time (20+ seconds). If you really want or need the extended stats, please make sure that your Prometheus scraping interval and timeouts are set accordingly.