Table: newrelic_alert_condition - Query New Relic Alert Conditions using SQL
New Relic Alert Conditions is a feature within the New Relic platform that allows you to monitor and respond to issues across your applications and infrastructure. It provides a centralized way to set up and manage alerts based on various conditions, such as error rates, response times, and server load. New Relic Alert Conditions helps you stay informed about the health and performance of your applications and take appropriate actions when predefined conditions are met.
Table Usage Guide
The newrelic_alert_condition
table provides insights into alert conditions within the New Relic platform. As a DevOps engineer, explore condition-specific details through this table, including condition names, statuses, and severities. Utilize it to uncover information about conditions, such as those related to high error rates, slow response times, and overloaded servers, helping you to maintain optimal application performance.
Examples
List all alert conditions
Explore all the active alert conditions in your system to understand their configuration and status. This allows you to identify potential areas of concern and take proactive measures to prevent system failures.
select id, name, type, enabled, entities, metric, runbook_url, terms, user_metric, user_value_function, scope, gc_metric, violation_close_timer, policy_idfrom newrelic_alert_condition;
select id, name, type, enabled, entities, metric, runbook_url, terms, user_metric, user_value_function, scope, gc_metric, violation_close_timer, policy_idfrom newrelic_alert_condition;
List only enabled alert conditions
Discover the segments that are active within the alert conditions. This can help you focus on the areas that are currently in use and require monitoring, ensuring efficient resource allocation.
select name, type, metric, user_metric, user_value_function, gc_metricfrom newrelic_alert_conditionwhere enabled = true;
select name, type, metric, user_metric, user_value_function, gc_metricfrom newrelic_alert_conditionwhere enabled = 1;
List only alert conditions for a specific metric
Determine the areas in which specific alert conditions are linked to CPU percentage metrics. This allows for targeted monitoring and management of system performance.
select name, type, metric, user_metric, user_value_function, gc_metricfrom newrelic_alert_conditionwhere metric = 'cpu_percentage';
select name, type, metric, user_metric, user_value_function, gc_metricfrom newrelic_alert_conditionwhere metric = 'cpu_percentage';
Schema for newrelic_alert_condition
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
enabled | boolean | Indicates if the alert condition is enabled. | |
entities | jsonb | An array of entities associated with the alert condition. | |
gc_metric | text | The GC metric associated with the alert condition. | |
id | bigint | = | Unique identifier for the alert condition. |
metric | text | The metric type associated with the alert condition. | |
name | text | The name of the alert condition. | |
policy_id | bigint | = | Identifier for the policy alert condition belongs to. |
runbook_url | text | The url of the runbook associated with the alert condition. | |
scope | text | The scope of the alert condition. | |
terms | jsonb | An array of term objects associated with the alert condition. | |
type | text | The type of the alert condition. | |
user_metric | text | User defined metric associated with the alert condition. | |
user_value_function | text | User defined value function associated with the alert condition. | |
violation_close_timer | bigint |
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)" -- newrelic
You can pass the configuration to the command with the --config
argument:
steampipe_export_newrelic --config '<your_config>' newrelic_alert_condition