Table: linode_instance - Query Linode Instances using SQL
Linode Instances are virtual machines that run on the Linode platform. They are the building blocks of Linode and can be easily created, scaled, managed, and deleted. Each instance is a separate virtual machine within the same physical server.
Table Usage Guide
The linode_instance
table provides insights into each Linode Instance within the Linode platform. As a system administrator or a DevOps engineer, you can explore instance-specific details through this table, including configurations, status, and specifications. Utilize it to uncover information about each instance, such as its current running status, its hardware specifications, and its networking configurations.
Examples
List all instances
Explore all the instances within your Linode account to gain a comprehensive overview of your resources. This can help in efficient resource management and in identifying any anomalies or areas for optimization.
select *from linode_instance;
select *from linode_instance;
Instances by region
Explore which regions have the most instances to better allocate resources and manage server load.
select region, count(*)from linode_instancegroup by region;
select region, count(*)from linode_instancegroup by region;
Instances by type
Explore which types of instances are most commonly used, allowing you to understand usage patterns and optimize resource allocation.
select instance_type, count(*)from linode_instancegroup by instance_type;
select instance_type, count(*)from linode_instancegroup by instance_type;
Instances with a given tag
Explore which instances have been tagged with a specific label. This is useful for categorizing and quickly identifying instances in your Linode environment.
select label, status, tagsfrom linode_instancewhere tags ? 'foo'
Error: SQLite does not support '?' operator used for checking if an element exists in a JSON array.
Running instances
Explore which Linode instances are currently running to manage resources effectively and ensure optimal performance. This is beneficial in real-world scenarios for maintaining server health and preventing overloads.
select label, ipv4, status, tagsfrom linode_instancewhere status = 'running';
select label, ipv4, status, tagsfrom linode_instancewhere status = 'running';
Schema for linode_instance
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
alerts | jsonb | Alerts are triggered if CPU, IO, etc exceed these limits. | |
backups | jsonb | Information about this Linode’s backups status. | |
created | timestamp with time zone | When this Instance was created. | |
euuid | text | An external unique identifier for this account. | |
filter | text | = | Raw Linode list filter string in JSON format. |
hypervisor | text | The virtualization software powering this Linode, e.g. kvm. | |
id | bigint | = | The unique ID of this Instance. |
image | text | An Image ID to deploy the Disk from. | |
instance_type | text | This is the Linode Type that this Linode was deployed with. | |
ipv4 | jsonb | Array of this Linode’s IPv4 Addresses. | |
ipv6 | cidr | This Linode’s IPv6 SLAAC address. | |
label | text | = | The Instance’s label is for display purposes only. |
region | text | = | Region where the instance resides. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
specs | jsonb | Information about the resources available to this Linode, e.g. disk space. | |
status | text | The current status of the instance: creating, active, resizing, contact_support. | |
tags | jsonb | Tags applied to this instance as a map. | |
tags_src | jsonb | List of Tags applied to this instance. | |
updated | timestamp with time zone | When this Instance was last updated. | |
watchdog_enabled | boolean | The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. |
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)" -- linode
You can pass the configuration to the command with the --config
argument:
steampipe_export_linode --config '<your_config>' linode_instance