返回顶部
g

graylog-log-search

Search and debug production logs via Graylog - absolute/relative time queries, stream filtering, system health checks

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
21
下载量
0
收藏
概述
安装方式
版本历史

graylog-log-search

# 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 ```bash npm install -g mcp-server-graylog@1.0.3 ``` ### Configure Add to your OpenClaw or Claude Desktop MCP configuration: ```json { "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 ```bash 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: | Tool | Description | |------|-------------| | `search_logs_absolute` | Search logs between specific timestamps (ISO 8601) | | `search_logs_relative` | Search recent logs (last N seconds, default: 15 min) | | `list_streams` | Discover available application streams and their IDs | | `get_system_info` | Check 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 | Variable | Required | Description | |----------|----------|-------------| | `BASE_URL` | Yes | Full URL to your Graylog instance (e.g., `https://graylog.example.com`) | | `API_TOKEN` | Yes | Graylog 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 | Error | Solution | |-------|----------| | "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](https://github.com/Pranavj17)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 graylog-log-search-1775703794 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 graylog-log-search-1775703794 技能

通过命令行安装

skillhub install graylog-log-search-1775703794

下载 Zip 包

⬇ 下载 graylog-log-search v1.0.3

文件大小: 2.65 KB | 发布时间: 2026-4-11 22:56

v1.0.3 最新 2026-4-11 22:56
- Extracted shared helpers to enable better testability
- Fixed credential leak in code history
- All MCP protocol tests passing (54 tests)
- Enhanced documentation and troubleshooting sections

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部