← ClaudeAtlas

papertrail-clilisted

Perform Papertrail log management operations using the Papertrail HTTP API via curl. Use for searching logs and inspecting saved searches and systems.
abdullahkhawer/devops-skills · ★ 7 · DevOps & Infrastructure · score 78
Install: claude install-skill abdullahkhawer/devops-skills
# Papertrail CLI Skill Use the instance and rules below when constructing all Papertrail API commands. ## Configuration Update the table below with your Papertrail credential file paths: | Environment | Token File | |---|---| | Production | `~/.papertrail/prod.token` | | Staging | `~/.papertrail/staging.token` | If the target environment is unclear, ask the user before running any command. ## Prerequisites (one-time setup by user) Generate a Papertrail API token (**Settings → Profile → API Token**) for each environment and save it to the corresponding token file. Never print or display token values. Do not perform these steps yourself. ```bash mkdir -p ~/.papertrail && echo "<your-api-token>" > <TOKEN_FILE> && chmod 600 <TOKEN_FILE> ``` ## Command Format ```bash curl -s -H "X-Papertrail-Token: $(cat <TOKEN_FILE>)" \ "https://papertrailapp.com/api/v1/<endpoint>.json" | jq . ``` ## Available API Endpoints ### Read-only (safe, no confirmation needed) | Endpoint | Method | Description | |---|---|---| | `/api/v1/events/search.json?q=<query>` | GET | Search log events | | `/api/v1/searches.json` | GET | List saved searches | | `/api/v1/systems.json` | GET | List registered systems | | `/api/v1/groups.json` | GET | List system groups | ### Example — search logs ```bash curl -s -H "X-Papertrail-Token: $(cat <TOKEN_FILE>)" \ "https://papertrailapp.com/api/v1/events/search.json?q=<query>&system_id=<id>" | jq . ``` ### Mutating operations (confirm with user before ru