
Zabbix MCP Server
A middleware service that uses Model Context Protocol to analyze and automate Zabbix events with AI, enabling automated incident response and workflow automation through n8n integration.
README
Zabbix MCP Server
Middleware service sử dụng Model Context Protocol để phân tích và tự động hóa các sự kiện Zabbix với AI.
Tính năng
- Phân tích sự kiện Zabbix bằng AI (OpenAI/Ollama)
- Tự động hóa phản hồi sự cố
- Tích hợp với n8n cho workflow automation
- Caching và Rate Limiting
- Health Check System
- Logging System
- Unit Tests
- API Documentation
Yêu cầu hệ thống
Cài đặt bằng Docker
- Docker 20.10+
- Docker Compose 2.0+
- 4GB RAM trở lên
- 20GB ổ cứng trống
Cài đặt
Cài đặt bằng Docker (Khuyến nghị)
- Clone repository:
git clone https://github.com/thichcode/zabbix_mcp.git
cd zabbix_mcp
- Cấu hình môi trường:
cp .env.example .env
# Chỉnh sửa file .env với cấu hình của bạn
- Build và chạy containers:
docker-compose up -d
- Kiểm tra logs:
docker-compose logs -f app
- Kiểm tra health:
curl http://localhost:8000/api/v1/health
Cài đặt thủ công
- Clone repository:
git clone https://github.com/thichcode/zabbix_mcp.git
cd zabbix_mcp
- Tạo và kích hoạt môi trường ảo:
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
- Cài đặt dependencies:
pip install -r requirements.txt
- Cấu hình môi trường:
cp .env.example .env
# Chỉnh sửa file .env với cấu hình của bạn
- Cài đặt và cấu hình MongoDB:
# Ubuntu/Debian
sudo apt-get install mongodb
sudo systemctl start mongodb
# Windows
# Tải và cài đặt từ https://www.mongodb.com/try/download/community
- Cài đặt và cấu hình Redis:
# Ubuntu/Debian
sudo apt-get install redis-server
sudo systemctl start redis-server
# Windows
# Tải từ https://github.com/microsoftarchive/redis/releases
- Cấu hình Zabbix:
# Chạy script cấu hình
python scripts/setup_zabbix.py
Chạy ứng dụng
Docker
# Khởi động
docker-compose up -d
# Dừng
docker-compose down
# Xem logs
docker-compose logs -f app
# Restart
docker-compose restart app
Thủ công
- Chạy tests:
pytest tests/
- Chạy server:
uvicorn app.main:app --reload
- Kiểm tra health:
curl http://localhost:8000/api/v1/health
- Xem logs:
tail -f logs/api_*.log
Cấu hình Docker
Volumes
mongodb_data
: Lưu trữ dữ liệu MongoDBredis_data
: Lưu trữ dữ liệu Redisollama_data
: Lưu trữ models Ollama./logs
: Log files./.env
: Environment variables
Networks
zabbix_network
: Network cho các services
Ports
8000
: API server27017
: MongoDB6379
: Redis11434
: Ollama (tùy chọn)
API Endpoints
GET /api/v1/health
: Kiểm tra trạng thái hệ thốngPOST /api/v1/webhook
: Webhook endpoint cho ZabbixGET /docs
: API documentation (Swagger UI)
Cấu trúc dự án
zabbix_mcp/
├── app/
│ ├── api/
│ │ ├── webhook.py
│ │ └── health.py
│ ├── core/
│ │ └── logging.py
│ ├── models/
│ │ └── event.py
│ ├── services/
│ │ ├── analysis.py
│ │ ├── auth_service.py
│ │ ├── cache_service.py
│ │ ├── database.py
│ │ ├── deep_research.py
│ │ └── ollama_service.py
│ └── main.py
├── tests/
│ └── test_analysis.py
├── scripts/
│ └── setup_zabbix.py
├── logs/
├── .env.example
├── .gitignore
├── Dockerfile
├── docker-compose.yml
├── README.md
└── requirements.txt
Monitoring
- Health Check:
/api/v1/health
- Logs:
logs/
directory hoặcdocker-compose logs
- Metrics: Prometheus metrics (coming soon)
Development
- Cài đặt development dependencies:
pip install -r requirements-dev.txt
- Chạy code formatting:
black .
isort .
- Chạy linting:
flake8
mypy .
- Chạy tests với coverage:
pytest --cov=app tests/
Contributing
- Fork repository
- Tạo branch mới
- Commit changes
- Push lên branch
- Tạo Pull Request
License
MIT License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.