steampipe plugin install linode

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_instance
group by
region;
select
region,
count(*)
from
linode_instance
group 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_instance
group by
instance_type;
select
instance_type,
count(*)
from
linode_instance
group 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,
tags
from
linode_instance
where
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,
tags
from
linode_instance
where
status = 'running';
select
label,
ipv4,
status,
tags
from
linode_instance
where
status = 'running';

Schema for linode_instance

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
alertsjsonbAlerts are triggered if CPU, IO, etc exceed these limits.
backupsjsonbInformation about this Linode’s backups status.
createdtimestamp with time zoneWhen this Instance was created.
euuidtextAn external unique identifier for this account.
filtertext=Raw Linode list filter string in JSON format.
hypervisortextThe virtualization software powering this Linode, e.g. kvm.
idbigint=The unique ID of this Instance.
imagetextAn Image ID to deploy the Disk from.
instance_typetextThis is the Linode Type that this Linode was deployed with.
ipv4jsonbArray of this Linode’s IPv4 Addresses.
ipv6cidrThis Linode’s IPv6 SLAAC address.
labeltext=The Instance’s label is for display purposes only.
regiontext=Region where the instance resides.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
specsjsonbInformation about the resources available to this Linode, e.g. disk space.
statustextThe current status of the instance: creating, active, resizing, contact_support.
tagsjsonbTags applied to this instance as a map.
tags_srcjsonbList of Tags applied to this instance.
updatedtimestamp with time zoneWhen this Instance was last updated.
watchdog_enabledbooleanThe 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