← 返回
未分类 Key 中文

Graylog Log Search

Search and debug production logs via Graylog - absolute/relative time queries, stream filtering, system health checks
通过 Graylog 搜索和调试生产日志 — 绝对/相对时间查询、流过滤、系统健康检查
pranavj17 pranavj17 来源
未分类 clawhub v1.0.3 1 版本 100000 Key: 需要
★ 0
Stars
📥 378
下载
💾 0
安装
1
版本
#latest

概述

Graylog Log Search Skill

Search Graylog logs directly from your AI agent for production debugging. Query by absolute or relative timestamps, filter by application streams, and check system health.

Quick Start

Install

npm install -g mcp-server-graylog@1.0.3

Configure

Add to your OpenClaw or Claude Desktop MCP configuration:

{
  "mcpServers": {
    "graylog": {
      "command": "npx",
      "args": ["-y", "mcp-server-graylog@1.0.3"],
      "env": {
        "BASE_URL": "https://your-graylog-instance.example.com",
        "API_TOKEN": "your_graylog_api_token"
      }
    }
  }
}

To get your API token: Graylog Web UI > System > Users > Edit your user > Tokens > Create Token.

Verify

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | BASE_URL=https://your-graylog.example.com API_TOKEN=your_token npx mcp-server-graylog@1.0.3

You should see a JSON response with protocolVersion and capabilities.

Overview

This skill provides 4 MCP tools for searching and monitoring Graylog:

ToolDescription
-------------------
search_logs_absoluteSearch logs between specific timestamps (ISO 8601)
search_logs_relativeSearch recent logs (last N seconds, default: 15 min)
list_streamsDiscover available application streams and their IDs
get_system_infoCheck Graylog version, health, and processing status

Core Tasks

  • "Search for ERROR logs in the last 15 minutes"
  • "Find all 500 errors from the payment service between 2pm and 3pm today"
  • "List available Graylog streams so I can filter by application"
  • "Check if Graylog is healthy and processing logs"
  • "Search for timeout errors in the API stream from the last hour"

Environment Variable Contract

VariableRequiredDescription
---------------------------------
BASE_URLYesFull URL to your Graylog instance (e.g., https://graylog.example.com)
API_TOKENYesGraylog API token for authentication (Basic Auth)

Query Syntax

Uses Elasticsearch query syntax:

  • level:ERROR - Filter by log level
  • source:api-server - Filter by source
  • "connection timeout" - Exact phrase match
  • status:>=500 - Numeric range
  • message:exception - Wildcard match
  • level:ERROR AND source:payment - Boolean operators

Security & Guardrails

  • Read-only access: No write operations to Graylog - only searches and listing
  • Credential isolation: API token stored in environment variables, never in code or logs
  • Request timeout: 30-second timeout prevents hanging requests
  • Result limits: Queries capped at 1000 messages maximum, 50 by default
  • Input validation: All parameters validated before API calls (query, timestamps, stream IDs, limits)
  • Error sanitization: Error messages never expose API tokens or sensitive internal details
  • Time range bounds: Relative searches limited to 24 hours maximum

Troubleshooting

ErrorSolution
-----------------
"Missing environment variables"Set BASE_URL and API_TOKEN in your MCP config
"Authentication failed"Verify your API token is valid in Graylog UI
"Cannot reach Graylog"Check BASE_URL and network/VPN connectivity
"Invalid query"Check Elasticsearch query syntax
"Endpoint not found"Verify BASE_URL includes the correct Graylog URL (no trailing /api)

Release Notes

v1.0.3 (2026-04-08)

  • Extracted shared helpers for testable imports
  • Fixed credential leak in git history
  • 54 tests passing, all MCP protocol verified

v1.0.0 (2025-10-23)

  • First stable release with 4 tools
  • Fixed 5 critical bugs from initial implementation
  • Comprehensive test suite and documentation

Publisher

@Pranavj17

版本历史

共 1 个版本

  • v1.0.3 当前
    2026-05-07 06:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomas-security
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装后可防止您和您的用户受到提示注入、数据泄露及恶意行为的侵害。
★ 116 📥 30,976
it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,686
it-ops-security

Free Ride - Unlimited free AI

shaivpidadi
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
★ 471 📥 78,252