Alerts

From Kilo-Org/kilo-marketplace · View interactive version

Alerts is an AI agent skill from the GitHub repository Kilo-Org/kilo-marketplace. This subskill should be used when managing New Relic alert policies, APM or NRQL conditions, notification channels, or open incidents with the New Relic CLI. Use the parent newrelic-cli-skills skill for setup and routing.

How to use this skill

Skill file

Alert Management

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


List Alert Policies

newrelic alerts policy list

Get a Policy

newrelic alerts policy get --policyId <ID>

Create a Policy

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

Incident preference options:


Alert Conditions

List Conditions for a Policy

newrelic alerts conditions list --policyId <POLICY_ID>

Create an APM Metric Condition

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

newrelic alerts conditions delete --conditionId <ID>

NRQL Alert Conditions

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

# 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

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

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

Severity values: NOT_CONFIGURED, NOT_ALERTING, WARNING, CRITICAL

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.