{
  "markdown": "# VictoriaMetrics & VictoriaLogs Gemini Extension (victoriametrics-logs-mcp)\n\nA specialized Gemini CLI extension for interacting with VictoriaMetrics and VictoriaLogs instances. This extension provides expert-level MetricsQL and LogsQL support, health monitoring, and troubleshooting tools.\n\n## Features\n\n- **MCP Integration**: Seamlessly connects to community and custom MCP servers for monitoring and logging.\n- **Custom Skills**: \n  - `metrics-expert`: Specialized in PromQL/MetricsQL and query optimization.\n  - `logs-expert`: Specialized in LogsQL, log filtering, and full-text search.\n  - `troubleshooter`: Focused on health, ingestion, and storage diagnostics for both metrics and logs.\n- **VictoriaLogs Support**: Full LogsQL integration for log retrieval, statistics, and analysis.\n- **Slash Commands**:\n  - `/vm-status`: Quick health report and status summary.\n  - `/vm-query <query>`: Execute a query with AI-assisted interpretation.\n- **Persistent Context**: `GEMINI.md` provides foundational knowledge about VictoriaMetrics and VictoriaLogs architecture and best practices.\n\n## Installation\n\n### For Users (from GitHub)\nRun the following command to install the extension directly from the repository:\n```bash\ngemini extensions install https://github.com/nielsvbrecht/victoriametrics-logs-mcp.git\n```\n\n### For Developers (Local)\n1.  **Clone the repository**:\n    ```bash\n    git clone https://github.com/nielsvbrecht/victoriametrics-logs-mcp.git\n    cd victoriametrics-logs-mcp\n    ```\n\n2.  **Install dependencies and build**:\n    ```bash\n    npm install\n    npm run build\n    ```\n\n3.  **Link the extension**:\n    ```bash\n    gemini extensions link .\n    ```\n\n4.  **Configure Instances**:\n    By default, the extension looks for VictoriaMetrics at `http://localhost:8428` and VictoriaLogs at `http://localhost:9428`. You can customize this by editing `gemini-extension.json` or setting environment variables:\n    - `VM_INSTANCE_ENTRYPOINT`: URL of your VictoriaMetrics instance.\n    - `VL_INSTANCE_ENTRYPOINT`: URL of your VictoriaLogs instance.\n    - `VM_INSTANCE_TYPE`: `single` or `cluster`.\n\n## Usage\n\nOnce linked, start a new Gemini CLI session. You can use the following commands and tools:\n\n### Commands\n- `/vm-status`: \"Check the health of my VictoriaMetrics instance.\"\n- `/vm-query \"sum(rate(node_cpu_seconds_total[5m]))\"`: Run a query and get an analysis.\n\n### Tools\n- `victoriametrics__query`: Execute raw MetricsQL.\n- `vmMcpInfo__logs_query`: Execute LogsQL queries to retrieve log entries.\n- `vmMcpInfo__logs_hits`: Get log statistics and frequency over time.\n- `vmMcpInfo__logs_list_field_names`: Discover available log fields.\n- `vmMcpInfo__logs_list_field_values`: Explore unique values for a specific log field (e.g., `level`, `app`).\n- `vmMcpInfo__logs_status`: Check the health of your VictoriaLogs instance.\n- `vmMcpInfo__check_config`: Verify your local configuration.\n\n### Examples\n- **Logs Query**: `vmMcpInfo__logs_query(query='error AND app=\"api\"', limit=20)`\n- **Log Hits (Stats)**: `vmMcpInfo__logs_hits(query='level=\"error\"', step='1h')`\n- **List Log Fields**: `vmMcpInfo__logs_list_field_names()`\n- **List Field Values**: `vmMcpInfo__logs_list_field_values(field='host')`\n\n### Skills\nThe extension's skills are automatically available. You can also explicitly activate them:\n- `activate_skill(name=\"metrics-expert\")`\n\n## Development\n\n### Running Tests\n```bash\nnpm test\n```\n\n### Project Structure\n- `gemini-extension.json`: Extension manifest.\n- `index.js`: Local MCP server for extension metadata.\n- `skills/`: Specialized agent expertise.\n- `commands/`: Custom slash command definitions.\n- `GEMINI.md`: Core instruction set.\n\n## License\n\nThis project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details.\n\nThis project includes attributions to third-party software - see the [NOTICE](NOTICE) file for details.\n",
  "bytes": 3895,
  "sha": "5a180ca34700a424890c7b70e00d330ed553b37af6703a37a95b59e9a62ba3c6",
  "repo_slug": "nielsvbrecht/victoriametrics-logs-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_nielsvbrecht_victoriametrics_logs_mcp_a7953c85/readme"
}