turbot/newrelic
steampipe plugin install newrelic

Table: newrelic_alert_event - Query New Relic Alert Events using SQL

New Relic Alert Events is a service within New Relic that enables monitoring and responding to issues across your applications and infrastructure. It offers a centralized way to set up and manage alerts for various resources, helping you stay informed about the health and performance of your resources and take appropriate actions when predefined conditions are met.

Table Usage Guide

The newrelic_alert_event table provides insights into alert events within New Relic. As a DevOps engineer or system administrator, you can explore event-specific details through this table, including alert policies, conditions, and associated metadata. Utilize it to uncover information about alert events, such as those triggered by specific conditions, the associated policies, and the overall status of your system's health.

Examples

List alert events for open incidents

Determine the areas in which alert events are linked to currently open incidents. This is useful for identifying ongoing issues that require immediate attention or further investigation.

select
id,
timestamp,
event_type,
product,
description,
entity_id,
entity_type,
entity_group_id,
priority,
incident_id
from
newrelic_alert_event
where
incident_id in (
select
id
from
newrelic_alert_incident
where
closed_at is null
);
select
id,
timestamp,
event_type,
product,
description,
entity_id,
entity_type,
entity_group_id,
priority,
incident_id
from
newrelic_alert_event
where
incident_id in (
select
id
from
newrelic_alert_incident
where
closed_at is null
);

List alert events for a specific product

Explore alert events associated with a specific product to gain insights into incidents, their priority, and related entities. This can be particularly useful for troubleshooting product-related issues and understanding their impact.

select
id,
timestamp,
event_type,
product,
description,
entity_id,
entity_type,
entity_group_id,
priority,
incident_id
from
newrelic_alert_event
where
product = 'my-product';
select
id,
timestamp,
event_type,
product,
description,
entity_id,
entity_type,
entity_group_id,
priority,
incident_id
from
newrelic_alert_event
where
product = 'my-product';

Schema for newrelic_alert_event

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
descriptiontextDescription of the alert event.
entity_group_idbigint=Identifier of the group the entity associated with this alert event.
entity_idbigint=Identifier of the entity the alert event relates to.
entity_typetext=The type of the entity the alert event relates to.
event_typetext=The type of the alert event.
idbigintUnique identifier for the alert event.
incident_idbigint=Identifier of the incident for which the alert event was raised.
prioritytextPriority of the alert event.
producttext=The name of the product the alert event relates to.
timestamptimestamp with time zoneTimestamp when alert event was raised.

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_event