Docker setup consisting out of Grafana incl. a pre-configured dashboard, InfluxDB and Tailscale incl. a excelletn VPN network solution.
- Make sure you've installed all requirements
- Clone this repository:
git clone https://github.com/xinmans/docker-tailscale-monitor.git
- Create a copy of the sample
.env
file and adjust it at will:
cd docker-tailscale-monitor
cp .env.sample .env
- edit .env, change TAILSCALE_SKEY & TAILSCALE_USER to your value login https://login.tailscale.com/admin/settings/keys to enable the API keys
TAILSCALE_SKEY=tsky-xxx-xxxxx
[email protected]
- Spin up the containers:
docker-compose up -d
You can make use of the following environment variables / configurations:
Environment variable | Default value | Description |
---|---|---|
GRAFANA_PORT |
3000 |
Port to bind Grafana webinterface on the host system |
TAILSCALE_INTERVAL |
3600 |
Interval/pause (in seconds) between monitor |
TAILSCALE_HOST |
local |
Display name of the client |
TAILSCALE_SKEY |
your tailscale skey | like tskey-XXXX-XXXXXXXX |
TAILSCALE_USER |
your tailscale userid | email like [email protected] |
INFLUXDB_DB |
tailscale |
Database to save tailscale results |
INFLUXDB_HOST |
influxdb |
Name of the InfluxDB host/containers |
INFLUXDB_USERNAME |
root |
Username for InfluxDB authentication |
INFLUXDB_PASSWORD |
root |
Password for InfluxDB authentication |
$ docker-compose up -d
Creating docker-tailscale_influxdb_1 ... done
Creating docker-tailscale_grafana_1 ... done
Creating docker-tailscale_monitor ... done
$ docker-compose stop
Stopping docker-tailscale_influxdb_1 ... done
Stopping docker-tailscale_grafana_1 ... done
Stopping docker-tailscale_monitor ... done
$ docker-compose stop
$ docker-compose pull
$ docker-compose rm
$ docker-compose up -d
$ docker-compose logs -f
$ docker-compose logs -f grafana
By default the dashboard shows all speedtest results. To filter for a specifc host, simply add a and host = 'local'
statement in the WHERE
clause of the SQL select.
Example (Download Time Serie):
SELECT hostname,os,id,clientVersion,addresses,Relay901latencyMs FROM "devicestatus" WHERE $timeFilter ORDER BY time DESC
Access http://${HOSTNAME}:${GRAFANA_PORT}
(http://localhost:3000 by default) and login using the following default credentials:
- Username:
admin
- Password:
admin
- Fork it
- Create your feature branch:
git checkout -b feature/my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature/my-new-feature
- Submit a pull request
- Docker (incl.
docker-compose
)
1.0.0