Skip to content

paesslerdavid/prtg-skill

Repository files navigation

prtg-skill — Claude Code Skill for PRTG Network Monitor

A Claude Code skill for working with PRTG Network Monitor via the PRTG API v2. Includes endpoint references, filter syntax docs, schema references, Spectrum visualization guidelines, and utility scripts.

What This Skill Does

When you run /prtg <task>, Claude will:

  • Load your PRTG credentials from a .env file in the current directory
  • Query the PRTG API v2 using the correct endpoint paths, filter syntax, and auth patterns
  • Apply all known API quirks and gotchas automatically
  • Enforce safe-write workflow for POST/PATCH/DELETE (dry-run plan first, explicit confirmation before execution)
  • Generate Spectrum-themed visualizations (dashboards, charts, timelines, and summary views) when asked
  • Offer richer visualization presets (heatmaps, timeline stacks, SLA bars, flap ranking, dependency views)
  • Use API v1 only as a targeted fallback when required by endpoint/version gaps
  • Support offline fixture mode for deterministic demos when no live PRTG server is available

Install

git clone https://github.com/paesslerdavid/prtg-skill ~/.claude/skills/prtg

Or copy the prtg-skill/ directory directly:

cp -r prtg-skill ~/.claude/skills/prtg

Setup

  1. Create a .env file in your working directory (where you'll run Claude Code from):

    PRTG_HOST=https://your-prtg-server
    PRTG_API_KEY=your-api-token
    

    See .env.example for a template if your project includes one.

  2. (Optional) Refresh API docs to match your PRTG server version:

    python3 ~/.claude/skills/prtg/scripts/update_docs.py

    This downloads the live OpenAPI spec from your PRTG server and regenerates docs/api-endpoints.md and docs/api-schemas.md in your current directory.

    Note: references/api-filtering.md is a manually curated reference and is not regenerated by this script. It documents filter syntax, the include parameter, and common pitfalls that are not derivable from the OpenAPI spec alone.

  3. (Optional) Download Spectrum CSS for dashboard styling:

    python3 ~/.claude/skills/prtg/scripts/fetch_spectrum.py

    This downloads spectrum.css into your current directory. Generated HTML dashboards will link to it for consistent Paessler styling.

  4. (Recommended) Run preflight checks before a session:

    python3 ~/.claude/skills/prtg/scripts/preflight.py

    This validates credentials, v2 connectivity, filter behavior, optional v1 fallback reachability, and local spectrum.css availability.

Usage

Once the skill is installed, start any PRTG-related task with /prtg:

/prtg how many devices and sensors are there?
/prtg show me all sensors that are currently down
/prtg build a status dashboard for group 53
/prtg build a sensor status heatmap by device group
/prtg create a ping sensor named "Uptime Check" on device 42
/prtg rename sensor 2490 to "Web Server Response Time"
/prtg build a timeseries chart for sensors 2490, 2491, and 2492
/prtg build a topology-style overview of probe health and cross-site links

What's Included

prtg-skill/
├── SKILL.md                         ← Skill definition (loaded by Claude Code)
├── README.md                        ← This file
├── references/
│   ├── api-endpoints.md             ← All 115 operations: paths, params, response codes
│   ├── api-filtering.md             ← Filter syntax, operators, filterable properties
│   ├── api-schemas.md               ← Request/response body schemas
│   ├── spectrum-design-system.md    ← Compact Spectrum token reference for static visualizations
│   ├── spectrum-full-system.md      ← Full Spectrum component system for richer UI patterns
│   ├── spectrum-visualization-guidelines.md ← When to use each + mandatory branding/look-and-feel
│   ├── visualization-patterns.md    ← Visualization module catalog + v2/v1 fallback strategy
│   ├── write-operations-playbook.md ← Dry-run, confirmation, rollback workflow for writes
│   ├── error-handling.md            ← HTTP failure triage, retry rules, fallback policy
│   └── sensor-creation-guide.md     ← Sensor creation workflow, metascan, POST body gotchas
├── assets/
│   ├── dashboard-templates/         ← Reusable Spectrum HTML templates
│   └── fixtures/                    ← Offline sample payloads for deterministic demos/tests
├── agents/
│   └── openai.yaml                  ← UI metadata (display name, short description, default prompt)
└── scripts/
    ├── update_docs.py               ← Refresh API docs from live PRTG server
    ├── fetch_spectrum.py            ← Download spectrum.css from PRTG server
    ├── prtg_client.py               ← Shared client helper for env loading, pagination, and v1 fallback
    ├── preflight.py                 ← Session readiness checks
    ├── build_fixture_dashboard.py   ← Build offline HTML dashboard from fixture JSON
    └── validate_skill.py            ← Validate skill references and required files

The reference docs are a snapshot from a PRTG QA instance. Run update_docs.py to regenerate them for your specific PRTG version.

Offline Fixture Mode

Use this when live API access is unavailable:

python3 ~/.claude/skills/prtg/scripts/build_fixture_dashboard.py --output fixture-dashboard.html

The script reads sample JSON from assets/fixtures/ and writes a static dashboard for demos and CI checks.

Validation

Validate local skill integrity:

python3 ~/.claude/skills/prtg/scripts/validate_skill.py

Requirements

  • Python 3.7+
  • pyyaml, jsonref, python-dotenv (auto-installed by update_docs.py if missing)
  • curl available in PATH (for API calls from Claude Code sessions)

Notes

  • spectrum.css is not bundled — licensing is uncertain. Use fetch_spectrum.py to download it from your own PRTG server, or copy it from the PRTG installation directory (C:\Program Files (x86)\PRTG Network Monitor\webroot\).
  • The skill is v2-first. API v1 may be used only as a narrow fallback for unsupported visualization data paths.
  • Auto-invocation is enabled — Claude will use this skill automatically for PRTG-related tasks, or you can explicitly type /prtg.

About

Claude Code skill for interacting with PRTG Network Monitor API v2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors