External integration - Tailscale

Hello everyone,

I’m introducing a new external integration for Gladys: Tailscale.

What is it for?

If you use Tailscale to connect your Gladys, your NAS, or your remote servers, this integration displays the status of your network (your « tailnet ») directly in Gladys.

Each machine in the tailnet becomes a Gladys device with:

  • Online: the machine is connected to the tailnet, or not;
  • Update available: a newer version of Tailscale exists for it;
  • Key expiration: the number of days before it needs to reconnect;
  • Expiration disabled: a switch, like the « Disable key expiry » menu in the Tailscale console.

Scenes (Gladys 5.1 and later)

Triggers:

  • machine online or offline;
  • new machine in the tailnet (approved or pending approval);
  • Tailscale update available;
  • key soon to expire (adjustable delay, 14 days by default).

Actions:

  • refresh the tailnet;
  • read the status of a machine (online, IP, version, days before expiration…);
  • enable or disable the key expiration of a machine.

Example: when my NAS goes offline, send me a message « {{triggerEvent.data.device_name}} is offline ».

Widget

A Tailscale Network widget for the dashboard: number of online and offline machines, API status, and the list of machines that require your attention (offline, expiring key, update, pending approval). A « Refresh » button and a link to the admin console.

How it works

  • The integration goes through the Tailscale API, in the cloud: nothing to install on your machines, and Gladys doesn’t need to be in the tailnet.
  • Connection via API access token, or better via OAuth client with the devices:core right: it never expires.
  • One request per read, every 60 seconds by default (adjustable).
  • Tokens and secrets are never written in the logs.
  • Available in French, English, German, and Spanish.

Installation

  1. You need Gladys 5.1 or newer.
  2. Install Tailscale from the Gladys integrations catalog.
  3. Create an OAuth client in the Tailscale console: Settings → OAuth clients, with the Devices → Core right (Read is enough to monitor, Write in addition to change the key expiration from Gladys).
  4. Paste the ID and secret in the Configuration tab, then click on Test the connection.
  5. Add your machines from the Discovery tab.

The complete documentation is here: docs/fr.md

Links

This is the first version (1.0.0): your feedback is welcome, here or on GitHub!

Community integration, not affiliated with Tailscale Inc.