turbot/newrelic
steampipe plugin install newrelic

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_id
from
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_id
from
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_metric
from
newrelic_alert_condition
where
enabled = true;
select
name,
type,
metric,
user_metric,
user_value_function,
gc_metric
from
newrelic_alert_condition
where
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_metric
from
newrelic_alert_condition
where
metric = 'cpu_percentage';
select
name,
type,
metric,
user_metric,
user_value_function,
gc_metric
from
newrelic_alert_condition
where
metric = 'cpu_percentage';

Schema for newrelic_alert_condition

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
enabledbooleanIndicates if the alert condition is enabled.
entitiesjsonbAn array of entities associated with the alert condition.
gc_metrictextThe GC metric associated with the alert condition.
idbigint=Unique identifier for the alert condition.
metrictextThe metric type associated with the alert condition.
nametextThe name of the alert condition.
policy_idbigint=Identifier for the policy alert condition belongs to.
runbook_urltextThe url of the runbook associated with the alert condition.
scopetextThe scope of the alert condition.
termsjsonbAn array of term objects associated with the alert condition.
typetextThe type of the alert condition.
user_metrictextUser defined metric associated with the alert condition.
user_value_functiontextUser defined value function associated with the alert condition.
violation_close_timerbigint

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