Skip to content
Back to skills

Alerts

ASecurity

Manage alert policies, conditions, and notification channels via CLI. ---

  • 16 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added June 7, 2026
databasesgobashperformance

Works with

  • cli

Security analysis

A100/100

Scanned June 7, 2026

npx -y skills add modbender/skill-library-mcp --skill alerts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Alerts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Alerts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-alerts/badge)](https://www.skillsdirectory.com/skills/modbender-alerts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Alert Management

Manage alert policies, conditions, and notification channels via CLI.

---

## List Alert Policies

```bash
newrelic alerts policy list
```

## Get a Policy

```bash
newrelic alerts policy get --policyId <ID>
```

## Create a Policy

```bash
newrelic alerts policy create \
  --name "My App - Performance" \
  --incidentPreference "PER_CONDITION_AND_TARGET"
```

Incident preference options:
- `PER_POLICY` — one incident per policy breach
- `PER_CONDITION` — one incident per condition
- `PER_CONDITION_AND_TARGET` — most granular, one per condition+entity

---

## Alert Conditions

### List Conditions for a Policy

```bash
newrelic alerts conditions list --policyId <POLICY_ID>
```

### Create an APM Metric Condition

```bash
newrelic alerts apmCondition create \
  --policyId <POLICY_ID> \
  --name "High Response Time" \
  --type "apm_app_metric" \
  --metric "response_time_web" \
  --conditionScope "application" \
  --violationCloseTimer 24 \
  --threshold 2.0 \
  --thresholdDuration 5 \
  --thresholdOccurrences "ALL"
```

### Delete a Condition

```bash
newrelic alerts conditions delete --conditionId <ID>
```

---

## NRQL Alert Conditions

```bash
newrelic alerts nrqlCondition static create \
  --policyId <POLICY_ID> \
  --name "Error Rate > 5%" \
  --query "SELECT percentage(count(*), WHERE error IS true) FROM Transaction WHERE appName='my-app'" \
  --threshold 5 \
  --thresholdDuration 5 \
  --thresholdOccurrences "ALL" \
  --violationTimeLimitSeconds 86400
```

---

## Notification Channels

```bash
# List channels
newrelic alerts channel list

# Create email channel
newrelic alerts channel create \
  --name "On-Call Email" \
  --type email \
  --configuration '{"recipients": "team@example.com", "include_json_attachment": false}'
```

---

## View Open Incidents

```bash
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT *
  FROM NrAiIncident
  WHERE event = 'open'
  SINCE 24 hours ago
  LIMIT 20
"
```

---

## Check Entity Alert Severity

```bash
newrelic entity search --name "my-app" --type APPLICATION --domain APM | \
  jq '.[] | {name, alertSeverity}'
```

Severity values: `NOT_CONFIGURED`, `NOT_ALERTING`, `WARNING`, `CRITICAL`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.