steampipe plugin install oci

Table: oci_budget_alert_rule - Query OCI Budgets Alert Rules using SQL

Oracle Cloud Infrastructure (OCI) Budgets service allows you to set budget thresholds and send notifications when the thresholds are exceeded. Alert rules can be set up to track spending and usage, allowing users to manage their costs and consumption effectively. Alert rules are associated with a specific budget and trigger notifications based on the thresholds defined.

Table Usage Guide

The oci_budget_alert_rule table provides insights into alert rules within OCI Budgets service. As a financial analyst or cloud cost manager, you can explore details about each alert rule through this table, including the associated budget, threshold, and type of alert. Use this table to track and manage spending, understand cost trends, and ensure budget compliance.

Examples

Basic info

Explore the financial boundaries of your project by identifying the alert rules in your budget. This query can help you assess the financial health and lifecycle state of your project.

select
display_name,
id,
budget_id,
threshold,
lifecycle_state as state
from
oci_budget_alert_rule;
select
display_name,
id,
budget_id,
threshold,
lifecycle_state as state
from
oci_budget_alert_rule;

List alert rules that are not active

Explore which budget alert rules within your OCI environment are not currently active. This is useful for identifying potential savings or areas where budget tracking may not be effectively implemented.

select
display_name,
id,
budget_id,
threshold,
lifecycle_state as state
from
oci_budget_alert_rule
where
lifecycle_state <> 'ACTIVE';
select
display_name,
id,
budget_id,
threshold,
lifecycle_state as state
from
oci_budget_alert_rule
where
lifecycle_state <> 'ACTIVE';

List alert rules with a threshold more than 100 percentage

Determine the areas in which budget alert rules have been set with a threshold exceeding 100 percent. This can be useful to identify potential errors or overly conservative settings in your financial monitoring.

select
display_name,
id,
budget_id,
threshold,
lifecycle_state as state
from
oci_budget_alert_rule
where
threshold > 100
and threshold_type = 'PERCENTAGE';
select
display_name,
id,
budget_id,
threshold,
lifecycle_state as state
from
oci_budget_alert_rule
where
threshold > 100
and threshold_type = 'PERCENTAGE';

Schema for oci_budget_alert_rule

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
budget_idtext=The OCID of the budget
compartment_idtextThe OCID of the compartment in Tenant in which the resource is located.
defined_tagsjsonbDefined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources.
descriptiontextThe description of the alert rule.
display_nametext=The name of the alert rule.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the alert rule.
lifecycle_statetext=The current state of the alert rule.
messagetextCustom message sent when alert is triggered.
recipientstextDelimited list of email addresses to receive the alert when it triggers.
tagsjsonbA map of tags for the resource.
tenant_idtextThe OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
thresholddouble precisionThe threshold for triggering the alert. If thresholdType is PERCENTAGE, the maximum value is 10000.
threshold_typetextThe type of threshold.
time_createdtimestamp with time zoneTime that budget was created.
time_updatedtimestamp with time zoneTime that budget was updated.
titletextTitle of the resource.
typetextThe type of alert.
versionbigintVersion of the alert rule. Starts from 1 and increments by 1.

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)" -- oci

You can pass the configuration to the command with the --config argument:

steampipe_export_oci --config '<your_config>' oci_budget_alert_rule