# Alerting Opsgenie

> Opsgenie alert management and on-call scheduling. Use for listing alerts, checking on-call, computing MTTA/MTTR, and alert fatigue analysis. Supports team and priority filtering.

- **Type:** Skill
- **Install:** `agentstack add skill-swapnildahiphale-opensre-alerting-opsgenie`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [swapnildahiphale](https://agentstack.voostack.com/s/swapnildahiphale)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [swapnildahiphale](https://github.com/swapnildahiphale)
- **Source:** https://github.com/swapnildahiphale/OpenSRE/tree/main/sre-agent/.claude/skills/alerting-opsgenie
- **Website:** https://opensre.in

## Install

```sh
agentstack add skill-swapnildahiphale-opensre-alerting-opsgenie
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Opsgenie Integration

## Authentication

**IMPORTANT**: Credentials are injected automatically by a proxy layer. Do NOT check for `OPSGENIE_API_KEY` in environment variables - they won't be visible to you. Just run the scripts directly; authentication is handled transparently.

Configuration environment variables you CAN check (non-secret):
- `OPSGENIE_BASE_URL` - Proxy base URL (set automatically in production)
- `OPSGENIE_API_URL` - Custom API URL (default: https://api.opsgenie.com)

---

## Available Scripts

All scripts are in `.claude/skills/alerting-opsgenie/scripts/`

### list_alerts.py - List Alerts
```bash
python .claude/skills/alerting-opsgenie/scripts/list_alerts.py [--status open] [--priority P1] [--query QUERY] [--max-results N]
```

### get_alert.py - Get Alert Details
```bash
python .claude/skills/alerting-opsgenie/scripts/get_alert.py --alert-id ALERT_ID
```

### get_alert_logs.py - Alert Timeline
```bash
python .claude/skills/alerting-opsgenie/scripts/get_alert_logs.py --alert-id ALERT_ID [--max-results 50]
```

### list_alerts_by_date_range.py - Historical Alerts with MTTA/MTTR
```bash
python .claude/skills/alerting-opsgenie/scripts/list_alerts_by_date_range.py --since "2024-01-01T00:00:00Z" --until "2024-01-31T23:59:59Z" [--query QUERY]
```

### list_services.py - List Services
```bash
python .claude/skills/alerting-opsgenie/scripts/list_services.py
```

### list_teams.py - List Teams
```bash
python .claude/skills/alerting-opsgenie/scripts/list_teams.py
```

### get_on_call.py - On-Call Schedule
```bash
python .claude/skills/alerting-opsgenie/scripts/get_on_call.py [--schedule-id ID] [--team-id ID]
```

### get_alert_analytics.py - Alert Fatigue Analysis
```bash
python .claude/skills/alerting-opsgenie/scripts/get_alert_analytics.py --since "2024-01-01T00:00:00Z" --until "2024-01-31T23:59:59Z" [--team-id ID]
```

### calculate_mttr.py - MTTR Statistics
```bash
python .claude/skills/alerting-opsgenie/scripts/calculate_mttr.py [--team-id ID] [--priority P1] [--days 30]
```

---

## Investigation Workflow

### On-Call & Alert Triage
```
1. Check who's on call:
   get_on_call.py

2. List open alerts:
   list_alerts.py --status open

3. Get alert details:
   get_alert.py --alert-id 

4. Review alert timeline:
   get_alert_logs.py --alert-id 
```

### Alert Fatigue Analysis
```
1. Get alert analytics:
   get_alert_analytics.py --since "2024-01-01T00:00:00Z" --until "2024-01-31T23:59:59Z"

2. Review noisy alerts (high fire count, low ack rate)
3. Review flapping alerts (quick auto-resolve)

4. MTTR by priority:
   calculate_mttr.py --priority P1 --days 30
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [swapnildahiphale](https://github.com/swapnildahiphale)
- **Source:** [swapnildahiphale/OpenSRE](https://github.com/swapnildahiphale/OpenSRE)
- **License:** Apache-2.0
- **Homepage:** https://opensre.in

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-swapnildahiphale-opensre-alerting-opsgenie
- Seller: https://agentstack.voostack.com/s/swapnildahiphale
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
