Table: hcloud_action - Query Hetzner Cloud Actions using SQL
Hetzner Cloud Actions are tasks performed on resources within the Hetzner Cloud platform. These actions include tasks such as creating, updating, or deleting resources like servers, volumes, and networks. Each action has a status and progress which can be tracked to understand the outcome of the task.
Table Usage Guide
The hcloud_action
table provides insights into actions taken within Hetzner Cloud. As a system administrator, explore action-specific details through this table, including statuses, progress, and associated metadata. Utilize it to monitor the progress and outcomes of tasks, such as resource creation, updates, and deletions, and to identify any potential issues that may arise during these processes.
Examples
List create_server actions
Explore instances where server creation actions have been initiated to gain insights into system activity and manage resources effectively. This can be particularly useful for tracking resource allocation and identifying areas for optimization.
select *from hcloud_actionwhere command = 'create_server';
select *from hcloud_actionwhere command = 'create_server';
Get a specific action
Analyze the settings to understand the specifics of a particular action in your Hetzner Cloud environment. This can be useful in identifying changes or actions that could impact system performance or security.
select *from hcloud_actionwhere id = 271232672;
select *from hcloud_actionwhere id = 271232672;
Actions in error
Discover instances where actions have failed to execute correctly, allowing for the identification and resolution of potential issues within your system. This is crucial for maintaining optimal system performance and stability.
select *from hcloud_actionwhere status = 'error';
select *from hcloud_actionwhere status = 'error';
All actions related to a given server
Identify instances where specific server-related actions have taken place. This can help in monitoring server activity, providing insights into system usage and behavior patterns.
select a.*from hcloud_action as a, jsonb_array_elements(a.resources) as rwhere r ->> 'Type' = 'server' and (r -> 'ID') :: int = 14462596;
select a.*from hcloud_action as a, json_each(a.resources) as rwhere json_extract(r.value, '$.Type') = 'server' and json_extract(r.value, '$.ID') = 14462596;
Schema for hcloud_action
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
command | text | Command executed in the Action. | |
error | jsonb | Error message for the Action if error occurred, otherwise null. | |
finished | timestamp with time zone | Point in time when the Action was finished. Only set if the Action is finished otherwise null. | |
id | bigint | = | ID of the Action. |
progress | bigint | Progress of Action in percent. | |
resources | jsonb | Resources the Action relates to. | |
started | timestamp with time zone | Point in time when the Action was started. | |
status | text | = | Status of the Action: success, running, error. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- hcloud
You can pass the configuration to the command with the --config
argument:
steampipe_export_hcloud --config '<your_config>' hcloud_action