How grafana/grafana-zabbix works
Project Type and Purpose
• Type: Full-stack Grafana plugin (data source + panel plugin)
• Purpose:
– Provide a Zabbix data source for Grafana dashboards (metrics, templating, alerting)
– Offer an interactive “Triggers” panel to view and acknowledge Zabbix problems
File Structure
Top-level split:
• Backend (Go)
– pkg/plugin.go: plugin entrypoint (Grafana Plugin SDK)
– pkg/settings: plugin configuration models and loading
– pkg/datasource: core request/response handling, functions, models
– pkg/zabbixapi & pkg/zabbix: connectors to Zabbix HTTP API and direct DB connectors
– pkg/cache: in-memory caching/proxy for API calls
– pkg/timeseries, pkg/metrics, pkg/gtime: data processing, aggregation, time utilities
– go.mod / go.sum: dependency management
• Frontend (React + TS) under src/
– src/datasource: Grafana DataSource plugin UI (QueryEditor, ConfigEditor, responseHandler)
– src/panel-triggers: Custom panel plugin UI (ProblemsPanel, AlertList, modals, migrations)
– src/styles: SCSS variables and component styling files
– src/module.ts + plugin.json: plugin manifest and module registration
• Dev & CI config
– webpack.config.ts, .config/webpack: build pipeline for TS and SCSS
– jest.config.js, test-setup: unit test setup for frontend
– Magefile.go, Makefile, docker-compose.yml, devenv: local dev environment
– .github/workflows: CI for testing, compatibility checks, publishing
README for Additional Insights
• Confirms plugin features (templating, annotations, alerting, mixed-source metrics)
• Installation and usage context: loaded by Grafana via grafana-cli
• Live demo and documentation URLs
Capturing Essential Details
• Plugin endpoints (Query, Annotations, HealthCheck, Alerting)
• Cache/proxy layer sitting between connector and data processing
• Separation between DataSource plugin and Panel plugin UIs