turbot/newrelic
steampipe plugin install newrelic

Table: newrelic_alert_policy - Query New Relic Alert Policies using SQL

New Relic Alert Policies is a feature within New Relic's observability platform that allows you to set up and manage alert conditions for your applications and infrastructure. It provides a centralized way to monitor and respond to issues, enabling you to stay informed about the health and performance of your resources and take appropriate actions when predefined thresholds are met. New Relic Alert Policies helps in maintaining the stability of your systems by providing real-time alerting capabilities.

Table Usage Guide

The newrelic_alert_policy table provides insights into Alert Policies within New Relic's observability platform. As a DevOps engineer or system administrator, you can explore policy-specific details through this table, including the conditions that trigger alerts and the thresholds that have been set. Utilize it to monitor the health and performance of your applications and infrastructure, and to respond promptly to any issues that may arise.

Examples

List all alert policies

Explore the various alert policies, including when they were created and last updated, to better manage and respond to incidents in your New Relic environment. This can help improve your incident response strategy by keeping you informed about all the existing alert policies.

select
id,
name,
incident_preference,
created_at,
updated_at
from
newrelic_alert_policy;
select
id,
name,
incident_preference,
created_at,
updated_at
from
newrelic_alert_policy;

Obtain a single alert policy by id

Gain insights into a specific alert policy by using its unique identifier. This is useful in understanding the alert's preferences and tracking when it was created or last updated.

select
id,
name,
incident_preference,
created_at,
updated_at
from
newrelic_alert_policy
where
id = 142354;
select
id,
name,
incident_preference,
created_at,
updated_at
from
newrelic_alert_policy
where
id = 142354;

Schema for newrelic_alert_policy

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
created_attimestamp with time zoneTimestamp at which the policy was created.
idbigint=Unique identifier for the alert policy.
incident_preferencetextThe preference type of the incident (PER_POLICY, PER_CONDITION, PER_CONDITION_AND_TARGET).
nametext=Name of the policy.
updated_attimestamp with time zoneTimestamp at which the policy was updated.

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_policy