Table: pipes_tenant - Query Pipes Tenants using SQL
Pipes Tenants are entities within the Pipes service representing groups or organizations that utilize the service. They contain comprehensive information about the tenant, including creation and update times, state, and various usage thresholds. Managing these tenants is crucial for ensuring proper allocation and monitoring of resources.
Table Usage Guide
The pipes_tenant
table provides detailed insights into the tenants within the Pipes service. As a System Administrator or a DevOps Engineer, use this table to explore tenant-specific details such as their state, creation and update times, and usage thresholds. This information is vital for tenant lifecycle management, resource allocation, and ensuring compliance with usage policies.
Examples
Basic info
Retrieve basic information about tenants, including their display name, handle, and current state. This can help in understanding the overall tenant landscape and monitoring their statuses.
select id, display_name, handle, statefrom pipes_tenant;
select id, display_name, handle, statefrom pipes_tenant;
List active tenants
Identify active tenants to manage and allocate resources efficiently. Active tenants are those that are currently utilizing the Pipes service.
select id, display_name, handle, statefrom pipes_tenantwhere state = 'active';
select id, display_name, handle, statefrom pipes_tenantwhere state = 'active';
List tenants created in the last 30 days
Find tenants that were created in the last 30 days to monitor new additions and ensure they are onboarded properly.
select id, display_name, handle, created_atfrom pipes_tenantwhere created_at >= (current_date - interval '30' day);
select id, display_name, handle, created_atfrom pipes_tenantwhere created_at >= date('now', '-30 day');
Tenants exceeding compute usage threshold
Identify tenants whose compute usage exceeds the set threshold, which is essential for managing and preventing resource overuse.
select id, display_name, handle, usage_compute_threshold, usage_compute_actionfrom pipes_tenantwhere usage_compute_threshold < (current_compute_usage);
select id, display_name, handle, usage_compute_threshold, usage_compute_actionfrom pipes_tenantwhere usage_compute_threshold < (current_compute_usage);
Schema for pipes_tenant
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
avatar_url | text | The avatar URL of the tenant. | |
created_at | timestamp with time zone | The time of creation in ISO 8601 UTC. | |
created_by_id | text | The ID of the user that created this. | |
deleted_at | timestamp with time zone | The time the item was deleted in ISO 8601 UTC. | |
deleted_by_id | text | The ID of the user that performed the deletion. | |
display_name | text | The display name of the tenant. | |
handle | text | = | The handle name of the tenant. |
id | text | The unique identifier of the tenant. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | text | The state of the tenant. | |
updated_at | timestamp with time zone | The time of the last update in ISO 8601 UTC. | |
updated_by_id | text | The ID of the user that performed the last update. | |
usage_compute_action | text | The action to take when compute usage exceeds the threshold. | |
usage_compute_threshold | bigint | The threshold for compute usage. | |
usage_storage_action | text | The action to take when storage usage exceeds the threshold. | |
usage_storage_threshold | bigint | The threshold for storage usage. | |
usage_user_action | text | The action to take when user usage exceeds the threshold. | |
usage_user_threshold | bigint | The threshold for user usage. | |
user_id | text | =, !=, ~~, ~~*, !~~, !~~* | The unique identifier for the user. |
version_id | bigint | The version ID of this item. |
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)" -- pipes
You can pass the configuration to the command with the --config
argument:
steampipe_export_pipes --config '<your_config>' pipes_tenant