Quick Start
Set up a notification policy and send your first test alert
Send Your First Alert
With your integration created, let's set up routing and trigger a test alert.
Step 1: Create a Team
Alerts are routed to teams, not individual users. Let's create your first team:
- Go to Teams in the sidebar
- Click Create Team
- Enter a name (e.g., "On-Call")
- Add yourself as a member
- Click Create
Step 2: Create a Notification Policy
Policies determine how alerts are routed and escalated:
- Go to Policies in the sidebar
- Click Create Policy
- Configure the policy:
- Name: "All Alerts"
- Matching Rules: Leave empty to match all alerts
- Priority: Leave at default (1)
Step 3: Add an Escalation Step
In your new policy, add the routing:
- Click Add Step
- Select your team as the target
- Set timeout to 5 minutes
- Save the policy
This means: When an alert matches, notify the team immediately. If not acknowledged within 5 minutes, escalate.
Step 4: Send a Test Alert
Use curl to send a test alert to your webhook:
curl -X POST https://irm.nearlunar.com/api/webhooks/grafana/YOUR_INTEGRATION_ID \
-H "Content-Type: application/json" \
-d '{
"receiver": "webhook",
"status": "firing",
"alerts": [{
"status": "firing",
"labels": {
"alertname": "TestAlert",
"severity": "warning"
},
"annotations": {
"summary": "This is a test alert",
"description": "Testing NearIRM integration"
}
}]
}'Replace YOUR_INTEGRATION_ID with your actual integration ID from the webhook URL.
Step 5: Check Your Alerts
- Go to Alerts in the sidebar
- You should see your test alert with status "firing"
- Click the alert to view details
Step 6: Acknowledge the Alert
From the alert detail page:
- Click Acknowledge
- The status changes to "acknowledged"
- Escalation timer stops
Congratulations! You've completed the full alert lifecycle.
What's Next?
Now that you understand the basics:
- Policies - Learn about matching rules and multi-step escalation
- Schedules - Set up on-call rotations
- Integrations - Configure notification channels
- Alerts - Understand alert lifecycle and actions