Hetzner Cloud
This section explains how to create a Hetzner Cloud data source in DataDios, browse what your Hetzner project contains, and use Workload Analyzer to watch its cost and inventory.
Before You Start: Create an API Token
DataDios connects to one Hetzner Cloud project with a project API token. In the Hetzner Cloud Console, open the project, go to Security → API tokens, and generate a token.
- Read permission is enough to browse resources, see cost, and collect Workload Analyzer data.
- Read & Write permission is needed only to start or stop servers from DataDios.
A token belongs to a single project, so create one data source per Hetzner project.
Steps to Create and Test a Hetzner Cloud Data Source
- Navigate to the DataSources tab in DataDios and click Create DS.
- From the data source type list, select Hetzner Cloud.
- Fill in the Connection Details in the credentials form:
- Name: Desired name of the data source. (Mandatory)
- hcloud_token: The API token of the Hetzner Cloud project. (Mandatory) It is stored as a secret.
- After entering the details, click Test Connection to validate.
- If the test is successful, click Create to save the data source.
- You will be redirected to the Datasource Listing Page, where your Hetzner Cloud data source will appear.
- Explore the data source items hierarchically.
- Resources are grouped by Hetzner location (for example Falkenstein, Nuremberg, Helsinki, Ashburn, Hillsboro or Singapore).
- Under each location you will find that location's Servers, Volumes, Load Balancers, Floating IPs, Networks and Firewalls.
View Metadata about Data Source Items
- Click any item listed in the data source and then click the three stacked lines icon.
- A pop-up window shows the metadata for the selected item.
Turning Servers On and Off
- Click the Refresh Row Data icon first, so the status you see is current.
- Click the Power icon next to the three stacked lines button of a server to start or stop it.
- This works for servers only, and needs an API token with Read & Write permission.
Cost
The cost DataDios shows for Hetzner resources is calculated from Hetzner's public price catalog, not from your invoices: the hourly price multiplied by 24, or the monthly price divided by the number of days in the month for resources that are only priced monthly. Treat it as an estimate. It can differ from what Hetzner bills you.
Workload Analysis
When workload analysis is turned on for a Hetzner Cloud data source, DataDios collects two workflows. Both are enabled by default; uncheck one in the workflow list to exclude it.
| Workflow | Collected | What it shows |
|---|---|---|
| Hetzner Cost Workload | Daily | Estimated cost per day, by service type (for example a server type, volumes, load balancers). |
| Hetzner Inventory Workload | Hourly | What exists in the project and what state it is in. |
Inventory charts
The inventory workflow adds these views to the data source in Workload Analyzer:
- Hetzner Resources by Type: how many servers, volumes and load balancers the project has.
- Hetzner Servers Not Running: how many servers are not in the
runningstate. - Hetzner Unattached Volumes: how many volumes are not attached to any server. An unattached volume still costs money.
- Hetzner Inventory (latest snapshot): a table of every resource in the most recent snapshot, with its type, name, location, status, class (the server type or load balancer type), size in GB, whether it is attached, and its number of load balancer targets.
Things to know
- It is a snapshot, not a history. The project is sampled once an hour. Each point on a chart is the state at the latest snapshot in that hour, so something that started and stopped between two samples is not seen. The table shows only the latest snapshot.
- Only Hetzner Cloud resources are listed. Robot (dedicated) servers, such as AX-series machines, do not appear, so counts for a project that also uses them will look low. Floating IPs and networks are not part of the inventory.
- "Not running" means anything other than
running. That includesoff, the short-lived states Hetzner reports while a server is changing (starting,stopping,rebuilding,migrating,initializing,deleting), and a server whose status is empty orunknown. During a reboot or rebuild the chart can briefly show a server as not running. If you build an alert on it, expect short blips and consider that when you choose the threshold. - Load balancers have no status. Hetzner does not report one, so the status column is empty for load balancers and they are never counted as not running.
- Some columns are
0when they do not apply. Size (GB) and Attached only apply to volumes, and LB Targets only applies to load balancers; for every other resource type they show0, not blank. - A type with no resources shows
0. If you delete your last load balancer, its line on Hetzner Resources by Type drops to0rather than ending. If the whole project is empty, nothing is collected, so the charts show a gap instead of zeros. - Cost figures are catalog prices, as described above.
Connection Parameters
| Parameter | Required | Description |
|---|---|---|
hcloud_token | Yes | API token of the Hetzner Cloud project. Stored as a secret. |