Install
openclaw skills install graylog-log-searchSearch and debug production logs via Graylog - absolute/relative time queries, stream filtering, system health checks
openclaw skills install graylog-log-searchSearch Graylog logs directly from your AI agent for production debugging. Query by absolute or relative timestamps, filter by application streams, and check system health.
npm install -g mcp-server-graylog@1.0.3
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.
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.
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 |
| 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) |
Uses Elasticsearch query syntax:
level:ERROR - Filter by log levelsource:api-server - Filter by source"connection timeout" - Exact phrase matchstatus:>=500 - Numeric rangemessage:*exception* - Wildcard matchlevel:ERROR AND source:payment - Boolean operators| 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) |