Configuration values can be set using environment variables, or optionally loaded from an environment file. The settings include:
- **host** (`TAILSCALESD_HOST`): The host address on which the application will bind (designed to be used in a container, BE CAREFUL!). Default is `0.0.0.0`.
- **port** (`TAILSCALESD_PORT`): The port number on which the application will be accessible. Default is `9242`.
- **interval** (`TAILSCALESD_INTERVAL`): The interval on which the Tailscale API is polled in seconds. Default is `60`.
- **tailnet** (`TAILSCALESD_TAILNET`): The Tailscale tailnet identifier (required).
- **api_key** (`TAILSCALESD_API_KEY`): The Tailscale API key (required).
#### Environment File
You can also specify an environment file to load configuration values. The path to the environment file should be set in the `TAILSCALESD_ENV_FILE` environment variable. All of the config values can be provided in the env file.
This service provides the following Prometheus metrics:
-`tailscalesd_unhandled_background_task_crashes`
- **Type**: Counter
- **Description**: The number of unhandled background task crashes. This counter increases every time a background task crashes without being handled by the application.
-`tailscalesd_matrix_sd_down`
- **Type**: Counter
- **Description**: The number times a matrix sd host was unreachable. This counter increments each time a connection attempt to a matrix sd host fails.
- **Labels**:
-`device_hostname`: The hostname of the device that was unreachable.
It also provides HTTP server metrics from [trallnag/prometheus-fastapi-instrumentator](https://github.com/trallnag/prometheus-fastapi-instrumentator)