Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve table docs #47

Merged
merged 10 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/steampipe-anywhere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release Steampipe Anywhere Components

on:
push:
tags:
- 'v*'


jobs:
anywhere_publish_workflow:
uses: turbot/steampipe-workflows/.github/workflows/steampipe-anywhere.yml@main
secrets: inherit
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ from
linode_instance
```

## Engines

This plugin is available for the following engines:

| Engine | Description
|---------------|------------------------------------------
| [Steampipe](https://steampipe.io/docs) | The Steampipe CLI exposes APIs and services as a high-performance relational database, giving you the ability to write SQL-based queries to explore dynamic data. Mods extend Steampipe's capabilities with dashboards, reports, and controls built with simple HCL. The Steampipe CLI is a turnkey solution that includes its own Postgres database, plugin management, and mod support.
| [Postgres FDW](https://steampipe.io/docs/steampipe_postgres/index) | Steampipe Postgres FDWs are native Postgres Foreign Data Wrappers that translate APIs to foreign tables. Unlike Steampipe CLI, which ships with its own Postgres server instance, the Steampipe Postgres FDWs can be installed in any supported Postgres database version.
| [SQLite Extension](https://steampipe.io/docs//steampipe_sqlite/index) | Steampipe SQLite Extensions provide SQLite virtual tables that translate your queries into API calls, transparently fetching information from your API or service as you request it.
| [Export](https://steampipe.io/docs/steampipe_export/index) | Steampipe Plugin Exporters provide a flexible mechanism for exporting information from cloud services and APIs. Each exporter is a stand-alone binary that allows you to extract data using Steampipe plugins without a database.
| [Turbot Pipes](https://turbot.com/pipes/docs) | Turbot Pipes is the only intelligence, automation & security platform built specifically for DevOps. Pipes provide hosted Steampipe database instances, shared dashboards, snapshots, and more.

## Developing

Prerequisites:
Expand Down Expand Up @@ -67,11 +79,17 @@ Further reading:
- [Writing plugins](https://steampipe.io/docs/develop/writing-plugins)
- [Writing your first table](https://steampipe.io/docs/develop/writing-your-first-table)

## Contributing
## Open Source & Contributing

This repository is published under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) (source code) and [CC BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/2.0/) (docs) licenses. Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!

[Steampipe](https://steampipe.io) is a product produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).

## Get Involved

Please see the [contribution guidelines](https://github.com/turbot/steampipe/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/turbot/steampipe/blob/main/CODE_OF_CONDUCT.md). All contributions are subject to the [Apache 2.0 open source license](https://github.com/turbot/steampipe-plugin-linode/blob/main/LICENSE).
**[Join #steampipe on Slack →](https://turbot.com/community/join)**

`help wanted` issues:
Want to help but don't know where to start? Pick up one of the `help wanted` issues:

- [Steampipe](https://github.com/turbot/steampipe/labels/help%20wanted)
- [Linode Plugin](https://github.com/turbot/steampipe-plugin-linode/labels/help%20wanted)
402 changes: 402 additions & 0 deletions docs/LICENSE

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ short_name: "linode"
description: "Steampipe plugin to query resources, users and more from Linode."
og_description: "Query Linode with SQL! Open source CLI. No DB required."
og_image: "/images/plugins/turbot/linode-social-graphic.png"
engines: ["steampipe", "sqlite", "postgres", "export"]
---

# Linode + Steampipe

[Linode](https://linode.com) is a cloud hosting company that provides virtual private servers and other infrastructure services.

[Steampipe](https://steampipe.io) is an open source CLI to instantly query cloud APIs using SQL.
[Steampipe](https://steampipe.io) is an open-source zero-ETL engine to instantly query cloud APIs using SQL.

List instances in your Linode account:

Expand Down Expand Up @@ -125,7 +126,4 @@ connection "linode_all" {
}
```

## Get involved

- Open source: https://github.com/turbot/steampipe-plugin-linode
- Community: [Join #steampipe on Slack →](https://turbot.com/community/join)
40 changes: 34 additions & 6 deletions docs/tables/linode_account.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,54 @@
# Table: linode_account
---
title: "Steampipe Table: linode_account - Query Linode Accounts using SQL"
description: "Allows users to query Linode Accounts, providing details about the account, including balance, transfer, and billing information."
---

Get account information, including balances.
# Table: linode_account - Query Linode Accounts using SQL

Linode is a cloud hosting provider that offers high-performance SSD Linux servers for all of your infrastructure needs. Linode has received multiple awards for being one of the best virtual private server providers. Linode's Account service provides detailed information about the account, including balance, transfer, and billing information.

## Table Usage Guide

The `linode_account` table provides insights into the account details within Linode. As a cloud engineer, explore account-specific details through this table, including balance, transfer, and billing information. Utilize it to uncover information about the account, such as current balance, pending charges, and the account's last payment date.

## Examples

### Get account information
Review the configuration for your Linode account to gain insights into its settings and details. This is useful for understanding the state and configuration of your account as a whole.

```sql+postgres
select
*
from
linode_account;
```

```sql
```sql+sqlite
select
*
from
linode_account
linode_account;
```

### Balances
Explore the financial status of your Linode accounts. This query provides an overview of the account balances, uninvoiced balances, and associated credit card details, helping you manage your resources effectively.

```sql
```sql+postgres
select
email,
balance,
balance_uninvoiced,
credit_card
from
linode_account
linode_account;
```

```sql+sqlite
select
email,
balance,
balance_uninvoiced,
credit_card
from
linode_account;
```
39 changes: 33 additions & 6 deletions docs/tables/linode_bucket.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,52 @@
# Table: linode_bucket
---
title: "Steampipe Table: linode_bucket - Query Linode Object Storage Buckets using SQL"
description: "Allows users to query Linode Object Storage Buckets, providing insights into the metadata and configuration settings of each bucket."
---

List object storage buckets in the Linode account.
# Table: linode_bucket - Query Linode Object Storage Buckets using SQL

Linode Object Storage is a globally-available, S3-compatible method for storing and accessing data. It offers highly scalable, robust, and inexpensive storage for backup, archiving, content distribution, and more. With Linode Object Storage, your data is stored and served in a secure and distributed manner.

## Table Usage Guide

The `linode_bucket` table provides insights into Object Storage Buckets within Linode's Object Storage service. As a DevOps engineer, explore bucket-specific details through this table, including names, created timestamps, and cluster regions. Utilize it to uncover information about buckets, such as their size, the number of objects they contain, and their respective cluster regions.

## Examples

### List buckets
Explore all the storage buckets available in your Linode account. This can help manage resources and assess storage needs.

```sql
```sql+postgres
select
*
from
linode_bucket
linode_bucket;
```

```sql+sqlite
select
*
from
linode_bucket;
```

### Buckets in us-east-1
Explore which Linode storage buckets are located in the 'us-east-1' region. This could be useful for managing data locality and ensuring regulatory compliance.

```sql
```sql+postgres
select
*
from
linode_bucket
where
cluster = 'us-east-1'
cluster = 'us-east-1';
```

```sql+sqlite
select
*
from
linode_bucket
where
cluster = 'us-east-1';
```
32 changes: 27 additions & 5 deletions docs/tables/linode_domain.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
# Table: linode_domain
---
title: "Steampipe Table: linode_domain - Query Linode Domains using SQL"
description: "Allows users to query Domains in Linode, specifically the domain and subdomain records, providing insights into DNS configurations and potential issues."
---

List domains for the Linode account.
# Table: linode_domain - Query Linode Domains using SQL

Linode Domains is a service within Linode that allows you to manage and configure domain and subdomain records for your websites. It provides a centralized way to set up and manage DNS records for various Linode resources, including virtual machines, databases, web applications, and more. Linode Domains helps you stay informed about the health and performance of your DNS configurations and take appropriate actions when predefined conditions are met.

## Table Usage Guide

The `linode_domain` table provides insights into Domains within Linode. As a DevOps engineer, explore domain-specific details through this table, including domain and subdomain records, TTL values, and associated metadata. Utilize it to uncover information about domains, such as those with misconfigured DNS records, the relationships between domains and subdomains, and the verification of TTL values.

## Examples

### List all domains
Explore all the domains available in your Linode account. This can help in managing and organizing your resources effectively.

```sql
```sql+postgres
select
*
from
linode_domain
linode_domain;
```

```sql+sqlite
select
*
from
linode_domain;
```

### Domains with a given tag
Discover the segments that are tagged with a specific label, enabling you to organize and manage your resources more effectively. This is particularly useful when you need to perform actions on a group of resources that share a common tag.

```sql
```sql+postgres
select
domain,
tags
Expand All @@ -24,3 +42,7 @@ from
where
tags ? 'foo'
```

```sql+sqlite
Error: SQLite does not support '?' operator for checking the existence of a key in a JSON object.
```
48 changes: 41 additions & 7 deletions docs/tables/linode_domain_record.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
# Table: linode_domain_record
---
title: "Steampipe Table: linode_domain_record - Query Linode Domain Records using SQL"
description: "Allows users to query Linode Domain Records, providing detailed information about the DNS records associated with a domain."
---

List domain records.
# Table: linode_domain_record - Query Linode Domain Records using SQL

Note: A `domain_id` must be provided in all queries to this table.
A Linode Domain Record represents a DNS record associated with a domain. These records define how internet traffic is directed for a domain. They can be created, updated, or deleted through the Linode API.

## Table Usage Guide

The `linode_domain_record` table provides insights into Domain Records within Linode. As a Network Administrator, explore record-specific details through this table, including record type, name, and associated data. Utilize it to uncover information about records, such as those associated with a specific domain, the record's target, and the priority of MX records.

**Important Notes**
- You must specify the `domain_id` in the `where` clause to query this table.

## Examples

### List all records for all domains
Explore the relationships between different domains and their associated records. This can help you understand the various connections and dependencies within your network infrastructure, providing valuable insights for management and troubleshooting purposes.

```sql+postgres
select
d.domain,
dr.record_type,
dr.name,
dr.target
from
linode_domain as d,
linode_domain_record as dr
where
dr.domain_id = d.id;
```

```sql
```sql+sqlite
select
d.domain,
dr.record_type,
Expand All @@ -18,16 +42,26 @@ from
linode_domain as d,
linode_domain_record as dr
where
dr.domain_id = d.id
dr.domain_id = d.id;
```

### List all domain records for a domain
Explore all the domain records associated with a specific domain ID to understand its configuration and settings. This can be useful in managing and troubleshooting domain-related issues.

```sql
```sql+postgres
select
*
from
linode_domain_record
where
domain_id = 1234
domain_id = 1234;
```

```sql+sqlite
select
*
from
linode_domain_record
where
domain_id = 1234;
```
42 changes: 36 additions & 6 deletions docs/tables/linode_event.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,58 @@
# Table: linode_event
---
title: "Steampipe Table: linode_event - Query Linode Events using SQL"
description: "Allows users to query Linode Events, specifically providing insights into system events related to Linode instances."
---

Query events from your Linode account.
# Table: linode_event - Query Linode Events using SQL

Linode Events are system events that occur on your Linode instances. They can include actions such as booting, shutting down, or resizing a Linode, and can be used to track changes and incidents in your environment. These events provide important information about the activity and performance of your resources.

## Table Usage Guide

The `linode_event` table provides insights into system events related to Linode instances. As a system administrator or DevOps engineer, explore event-specific details through this table, including event types, timestamps, and associated metadata. Utilize it to monitor system activity, track changes, and identify potential issues related to your Linode instances.

## Examples

### List token create events
Explore which events are related to the creation of tokens. This can be useful in understanding and auditing security measures, as token creation often relates to authentication processes.

```sql+postgres
select
*
from
linode_event
where
action = 'token_create';
```

```sql
```sql+sqlite
select
*
from
linode_event
where
action = 'token_create'
action = 'token_create';
```

### Events related to a specific domain
Discover the segments that pertain to a specific domain, enabling you to analyze and understand events related to that particular domain.

```sql
```sql+postgres
select
*
from
linode_event
where
entity ->> 'type' = 'domain'
and entity ->> 'label' = 'steampipe.io'
and entity ->> 'label' = 'steampipe.io';
```

```sql+sqlite
select
*
from
linode_event
where
json_extract(entity, '$.type') = 'domain'
and json_extract(entity, '$.label') = 'steampipe.io';
```
Loading