agentleFS
jakenutsjakenuts/agent-skills/skills/solarwinds-logs/SKILL.md

solarwinds-logs

Skill2 starsChanged 4 months agoMITView on GitHub

Search and analyze DealerVision production logs via SolarWinds Observability API. Use when investigating errors, debugging issues, checking system health, or when the user mentions logs, SolarWinds, production errors, or system monitoring. Requires the `logs` CLI tool to be installed.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search DealerVision production logs through the SolarWinds Observability API using the logs CLI tool.

    line 13
  2. Distinctive:

    Run the setup script from the deployed skill folder:

    line 34
  3. Very specific:

    If you are using Claude Code, replace ~/.codex/skills with ~/.claude/skills.

    line 46
  4. Distinctive:

    Create a new token with 'Logs Read' permission

    line 73
  5. Very specific:

    Default data center: na-01

    line 93
  6. Distinctive:

    If you prefer to install manually without the setup script:

    line 97
  7. Very specific:

    When you use --time-range, --start-time, or --end-time, the API may return a subset of entries that misses vital current/recent log entries.

    line 132
  8. Distinctive:

    When a user asks for something like "errors from today" or "logs from the last hour":

    line 142
  9. Very specific:

    Default to simple search: Run logs 'error' without time arguments

    line 144
  10. Distinctive:

    Only use time arguments when the user explicitly wants to:

    line 155
  11. Distinctive:

    Look at a specific historical window (e.g., "what happened last Tuesday between 2-4pm")

    line 157
  12. Distinctive:

    Start broad: - Run initial search without many filters

    line 194
  13. Distinctive:

    Narrow progressively: - Add severity, time-range, or program filters based on results

    line 195
  14. Very specific:

    Retrieve details: - Use --id with --with-data for full log entry inspection

    line 196
  15. Very specific:

    Export large datasets: - Use --output-file for comprehensive analysis

    line 197

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SolarWinds Log Search

Search DealerVision production logs through the SolarWinds Observability API using the logs CLI tool.

First-Time Setup (On Demand)

This skill requires the logs CLI tool, .NET 10, and a SolarWinds API token. Install only when the skill is activated.

1. Check if Already Installed

Linux/macOS:

logs --help 2>/dev/null || echo "Not installed - setup required"
echo "$SOLARWINDS_API_TOKEN"

Windows (PowerShell):

logs --help 2>$null
Write-Host "SOLARWINDS_API_TOKEN=$env:SOLARWINDS_API_TOKEN"

2. Install Dependencies and Tool (One-Time Setup)

Run the setup script from the deployed skill folder:

Linux/macOS:

bash ~/.codex/skills/solarwinds-logs/scripts/setup.sh

Windows (PowerShell):

pwsh ~/.codex/skills/solarwinds-logs/scripts/setup.ps1

If you are using Claude Code, replace ~/.codex/skills with ~/.claude/skills.

What this does:

  • Installs .NET SDK 10 if missing (user-level)
  • Installs the logs CLI tool from the skill-local package
  • Verifies the installation
  • Checks for required environment variables

Note: Installation only happens once; the tool becomes globally available.

3. Configure Environment Variable

The tool requires a SolarWinds API token for authentication.

Linux/macOS:

export SOLARWINDS_API_TOKEN="your-token-here"

Windows (PowerShell):

$env:SOLARWINDS_API_TOKEN = "your-token-here"

To obtain a token:

  1. Log in to SolarWinds Observability
  2. Navigate to Settings -> API Tokens
  3. Create a new token with 'Logs Read' permission

4. Verify Setup

Linux/macOS:

dotnet tool list --global | grep SolarWindsLogSearch
logs "test" --limit 1

Windows (PowerShell):

dotnet tool list --global | Select-String SolarWindsLogSearch
logs "test" --limit 1

Prerequisites

  • .NET SDK 10.0+ (required to install the tool)
  • SOLARWINDS_API_TOKEN environment variable (required to use the tool)
  • Default data center: na-01

Alternative: Manual Installation

If you prefer to install manually without the setup script:

# Requires .NET SDK 10.0+
dotnet tool install --global DealerVision.SolarWindsLogSearch --version 2.4.0 --add-source ~/.codex/skills/solarwinds-logs/tools

# If using Claude Code, replace ~/.codex/skills with ~/.claude/skills
# Windows path: %USERPROFILE%\\.codex\\skills\\solarwinds-logs\\tools (or .claude for Claude Code)

# Verify
logs --help

⚠️ Critical: Prefer Simple Searches (No Time Arguments)

The SolarWinds/Papertrail API is finicky with time ranges and often skips recent entries when time arguments are used. The logs tool is designed to start from the most recent entries and page backward through time automatically until a predefined limit (typically 24 hours worth of data).

Default Search Pattern

Always prefer simple keyword searches without time arguments:

# ✅ RECOMMENDED - Simple searches that capture current entries
logs 'error'
logs 'exception'
logs 'timeout'
logs 'DbUpdateException'

# ✅ GOOD - Add filters, but avoid time arguments
logs 'error' --severity ERROR
logs 'exception' --program webhook-api

Why Avoid Time Arguments?

When you use --time-range, --start-time, or --end-time, the API may return a subset of entries that misses vital current/recent log entries. This is a known quirk of the underlying Papertrail API.

# ⚠️ AVOID - Time arguments can miss recent entries
logs "error" --time-range 1h      # May miss errors from the last few minutes
logs "error" --time-range 24h     # May skip entries that just happened

How to Handle User Requests with Time References

When a user asks for something like "errors from today" or "logs from the last hour":

  1. Default to simple search: Run logs 'error' without time arguments
  2. Filter results after retrieval: The agent can filter out older entries from the results
  3. Only use time arguments if the user explicitly wants to exclude current/recent results

Example interpretations:

  • "Search logs for errors from today" → logs 'error' OR 'exception' (filter results yourself)
  • "Find exceptions in the last 4 hours" → logs 'exception' (filter results yourself)
  • "Show me errors, but only from yesterday, not today" → Time arguments are appropriate here

When Time Arguments Are Appropriate

Only use time arguments when the user explicitly wants to:

  • Exclude current/recent results
  • Look at a specific historical window (e.g., "what happened last Tuesday between 2-4pm")
  • Investigate a known past incident with specific timestamps

Quick Commands

# Search for errors (recommended - no time arguments)
logs 'error'

# Find specific exceptions
logs 'DbUpdateException' --severity ERROR --limit 10

# Filter by service (still no time arguments)
logs 'timeout' --program webhook-api

# Get full details for a specific log entry
logs --id 1901790063029837827 --with-data

# Export large result sets to file
logs 'exception' --output-file results.json

Key Options

OptionDescription
--time-range1h, 4h, 12h, 24h, 2d, 7d, 30d
--severityINFO, WARN, ERROR, DEBUG
--programFilter by service name (e.g., media-processing)
--hostnameFilter by host
--limitMax results (default 1000, max 50000)
--with-dataInclude structured JSON payload
--no-dataExclude payload (faster, smaller response)
--output-fileSave full results to file

Workflow Strategy

  1. Start broad - Run initial search without many filters
  2. Narrow progressively - Add severity, time-range, or program filters based on results
  3. Retrieve details - Use --id with --with-data for full log entry inspection
  4. Export large datasets - Use --output-file for comprehensive analysis

Output Format

Returns JSON with:

  • success: boolean status
  • query: search parameters used
  • summary: statistics including severity breakdown, truncation info
  • results: array of log entries with timestamps, source, severity, message
  • pagination: info for getting more results

Advanced Usage

For detailed documentation on query syntax, MCP server modes, and advanced patterns, see references/REFERENCE.md.

For common investigation patterns and recipes, see references/RECIPES.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.