- Added detailed JSDoc documentation to all core datasource classes in src/datasources/
- Documented execution logic classes in src/execution/
- Added TSDoc to API utility functions and resolvers in src/api/
- Documented shared models and enums in src/model/
This update enhances compatibility across multiple Zabbix versions and introduces tools for easier local development and testing.
Key improvements and verified version support:
- Verified Zabbix version support: 6.2, 6.4, 7.0, and 7.4.
- Version-specific feature handling:
- `history.push` is enabled only for Zabbix 7.0+; older versions skip it with a clear error or notice.
- Conditional JSON-RPC authentication: the `auth` field is automatically added to the request body for versions older than 6.4.
- Implemented static Zabbix version caching in the datasource to minimize redundant API calls.
- Query optimization refinements:
- Added mapping for implied fields (e.g., `state` -> `items`, `deviceType` -> `tags`).
- Automatically prune unnecessary Zabbix parameters (like `selectItems` or `selectTags`) when not requested.
- Local development environment:
- Added a new `zabbix-local` Docker Compose profile that includes PostgreSQL, Zabbix Server, and Zabbix Web.
- Supports testing different versions by passing the `ZABBIX_VERSION` environment variable (e.g., 6.2, 6.4, 7.0, 7.4).
- Provided a sample environment file at `samples/zabbix-local.env`.
- Documentation and Roadmap:
- Updated README with a comprehensive version compatibility matrix and local environment instructions.
- Created a new guide: `docs/howtos/local_development.md`.
- Updated maintenance guides and added "Local Development Environment" as an achieved milestone in the roadmap.
- Test suite enhancements:
- Improved Smoketest and RegressionTest executors with more reliable resource cleanup and error reporting.
- Made tests version-aware to prevent failures on older Zabbix instances.
BREAKING CHANGE: Dropped Zabbix 6.0 specific workarounds; the minimum supported version is now 6.2.
- Implement pushHistory mutation to support pushing telemetry data to Zabbix trapper items.
- Add VERBOSITY and MCP_LOG_* environment variables for controllable request/response logging in both API and MCP server.
- Enhance ZabbixRESTDataSource with better session handling and error logging.
- Update ZabbixHistory datasource to support history push operations.
- Expand documentation with new cookbook recipes and MCP integration guides.
- Add integration tests for history pushing (src/test/history_push*).
- Reorganize documentation, moving technical product info PDF to docs/use-cases/.
- Update GraphQL generated types and VCR templates.
- Implement query optimization (reduced output, parameter skipping) to minimize Zabbix API traffic.
- Add indirect dependency handling: deviceType implies tags and state implies items.
- Move schema extensions to samples/extensions/ to clarify their role as samples.
- Enhance DistanceTrackerDevice with String time fields to support optional date portions.
- Ensure allDevices strictly filters by deviceType and populates the field in results.
- Refactor runAllRegressionTests mutation to use internal unique names and improve stability.
- Fix unnecessary Zabbix API calls for item preprocessing during template and host imports.
- Update documentation including cookbook recipes, test specifications, and optimization guides.
- Add extensive unit, integration, and regression tests covering all implemented changes.
- Update docker-compose.yml to mount the samples/ directory as a volume.
- Update IntelliJ .idea run configurations to reflect the new sample extension paths.
- **Optimization**: Implemented automatic Zabbix parameter optimization by analyzing GraphQL selection sets.
- **ZabbixRequest**: Added optimizeZabbixParams with support for skippable parameters and implied field dependencies (e.g., state -> items).
- **Resolvers**: Updated allHosts, allDevices, allHostGroups, and templates to pass requested fields to data sources.
- **Data Sources**: Optimized ZabbixQueryHostsGenericRequest and ZabbixQueryTemplatesRequest to skip unnecessary Zabbix API calls.
- **Regression Tests**: Enhanced RegressionTestExecutor with new tests for optimization (REG-OPT, REG-OPT-NEG), state retrieval (REG-STATE), dependent items (REG-DEP), and empty results (REG-EMPTY).
- **Documentation**: Created query_optimization.md How-To guide and updated roadmap.md, README.md, and tests.md.
- **Bug Fixes**: Fixed deviceType tag assignment during host import and corrected ZabbixCreateHostRequest to support tags.
This commit introduces two new device types, GroundValueChecker and WeatherSensorDevice, which leverage public APIs (BORIS NRW and Open-Meteo) for real-time data collection. It also includes several API enhancements and fixes to support these new integrations.
Detailed changes:
- **New Device Types**:
- Added GroundValueChecker schema and integration with BORIS NRW WMS via Zabbix Script items.
- Added WeatherSensorDevice schema and integration with Open-Meteo via Zabbix HTTP Agent items.
- **API Enhancements**:
- Added error field to ZabbixItem for item-level error reporting.
- Updated CreateTemplateItem mutation input to support params (for Script items) and timeout.
- Registered missing scalar resolvers: JSONObject, DateTime, and Time.
- **Performance & Reliability**:
- Implemented batch fetching for item preprocessing in both host and template queries to reduce Zabbix API calls and ensure data visibility.
- Updated template_importer.ts to correctly handle Script item parameters.
- **Documentation**:
- Consolidated public API device recipes in docs/howtos/cookbook.md.
- Added guidance on analyzing data update frequency and setting reasonable update intervals (e.g., 1h for weather, 1d for ground values).
- **Testing**:
- Added new regression test REG-ITEM-META to verify item metadata (units, description, error, preprocessing) and JSONObject scalar support.
- Enhanced RegressionTestExecutor with more detailed host-item relationship verification.
This commit introduces support for provisioning weather sensors with geo-coordinates
via user macros and fixes a critical mapping bug in device status.
Changes:
- fix: Corrected DeviceStatus enum mapping (0=ENABLED, 1=DISABLED).
- feat: Added 'status' field to CreateTemplateItem input in GraphQL schema.
- feat: Enabled user macro assignment during host and template creation/import.
- feat: Added regression tests for user macro assignment and HTTP agent URL support.
- docs: Updated cookbook and sample queries to use {$LAT} and {$LON} macros.
- test: Added unit tests for macro assignment in HostImporter and TemplateImporter.
- chore: Regenerated GraphQL types.
This change introduces the Weather Sensor device type which retrieves data from public APIs, and enhances the core Host/Device interfaces to provide consistent access to inventory and items across all specialized device types. It also improves search logic and fixes several bugs identified during implementation.
- Weather Sensor Extension: Added schema and recipe for a device retrieving weather data via Zabbix HTTP agent items.
- Interface Enhancements: Added inventory and items fields to Host and Device interfaces to ensure all device specialized types have consistent access to monitoring and inventory data.
- Search Logic Improvements: Enhanced ParsedArgs to support searchByAny and technical name (host) searches when a name pattern is provided.
- Bug Fixes:
- Fixed getLocations argument order in the Zabbix API datasource.
- Implemented deduplication for groupids and templateids in HostImporter to prevent Zabbix duplicate value errors.
- Added missing url field to CreateTemplateItem for HTTP Agent item support.
- Testing:
- Extended the regression test suite with 4 new automated checks covering the fixed bugs.
- Updated Jest tests to accommodate the improved search parameters.
- Documentation: Updated cookbook and test specifications to reflect new features and regression testing obligations.
- Established a centralized test specification in docs/tests.md that defines test categories, cases, and a coverage checklist to ensure consistent quality and maintainability across the project.
- Implemented RegressionTestExecutor for managing automated regression tests on a live Zabbix system.
- Updated GraphQL schema and resolvers with a generic runAllRegressionTests mutation.
- Enhanced MCP integration with new operation files and detailed documentation for AI-driven automation.
- Updated README.md and How-To guides (Cookbook, Maintenance, MCP) to reflect the new testing framework and MCP capabilities.
- Verified all changes with a full Jest suite (74 tests) and live end-to-end smoketests.
- Extend Template and ZabbixItem types in GraphQL schema to support full item hierarchy and cloning.
- Update ZabbixQueryTemplatesRequest in src/datasources/zabbix-templates.ts to fetch comprehensive item configurations (type, status, history, delay, units, preprocessing, tags).
- Implement raw value resolvers for ZabbixItem.type_int and ZabbixItem.status_int in src/api/resolvers.ts.
- Add new MCP operations: mcp/operations/getTemplates.graphql and mcp/operations/importTemplates.graphql for template management via AI agents.
- Add 'Cloning a Template with Items' recipe to docs/howtos/cookbook.md.
- Update src/test/template_query.test.ts to ensure compatibility with extended datasource output.
- Add runSmoketest mutation to automate end-to-end verification.
- Add SmoketestExecutor and HostDeleter to support automated testing and cleanup.
- Extend createHost and importHosts to allow linking templates by name or ID.
- Update docs/howtos/cookbook.md with new recipe steps and AI/MCP guidance.
- Update .junie/guidelines.md with new verification and deployment standards.
- Add src/test/template_link.test.ts and update existing tests to cover new functionality.
- Regenerate GraphQL types to match schema updates.
This commit introduces a comprehensive set of GraphQL query and mutation samples based on the official Zabbix 7.4 API documentation, along with testing and automation improvements.
Changes:
- Documentation:
- Added 21 GraphQL sample files in docs/queries/from_zabbix_docs/ covering various Zabbix API operations.
- Updated docs/howtos/cookbook.md with a new recipe for executing these documentation samples.
- AI & MCP:
- Added mcp/operations/importHostGroups.graphql to enable host group import via MCP tools.
- Testing:
- Added src/test/zabbix_docs_samples.test.ts to automatically validate all documentation samples against the GraphQL schema.
- Add mcp/operations/importHosts.graphql for flexible, name-based host provisioning.
- Split schema verification operations into createVerificationHost.graphql and verifySchemaExtension.graphql to support Apollo MCP server requirements.
- Improve mcp/operations/createHost.graphql with better type mapping and error message retrieval.
- Fix syntax error in importHosts.graphql by replacing unsupported triple-quote docstrings with standard comments.
- Add src/test/mcp_operations_validation.test.ts to automatically validate MCP operations against the GraphQL schema.
- Update docs/howtos/cookbook.md with 🤖 AI/MCP guidance and refined recipe steps for schema extension verification.
- Update README.md, docs/howtos/mcp.md, and .junie/guidelines.md to:
- Add Docker (v27+) and Docker Compose (v2.29+) version requirements to the Tech Stack.
- Enforce the use of docker compose (without hyphen) for all commands in the Environment guidelines.
- Replace legacy docker-compose references across all documentation with the new command format.
This commit refines the project documentation by adding result verification steps to all recipes in the cookbook and formalizing documentation standards in the project guidelines.
Changes:
- docs/howtos/cookbook.md:
- Added 'Verify' steps to all recipes using GraphQL queries or agent checks.
- Enhanced 'Extending Schema with a New Device Type' recipe:
- Updated Step 1 with a realistic schema using 'DistanceTrackerDevice' implementing 'Host' and 'Device' interfaces.
- Added mandatory advice for new device types to implement 'Host' and 'Device'.
- Referenced the existing 'location_tracker_devices.graphql' as a prepared real-world sample.
- Split Step 3 into Method A (Manual Creation) and Method B (Automated Import).
- Expanded Step 4 with a host creation step (using importHosts) and a filtered allDevices query using tag_deviceType.
- Standardized icons for preparation (🛠️), configuration (⚙️), execution (🚀), and verification (✅).
- .junie/guidelines.md:
- Added 'Documentation Templates' section defining a formal Recipe Template.
- Standardized icons and step naming to maintain visual consistency across all guides.
- Added 'Review & Approval' rule to prevent automatic commits without user review.
- readme.improvement.plan.md:
- Added and completed 'Priority 7: Standardization & Verification' tasks.
- Updated implementation order to reflect the new standardization phase.
This commit introduces several improvements to the project's documentation,
roadmap, and AI agent integration (MCP).
Key changes:
- Created and styled roadmap.md to track project milestones and future plans.
- Updated .junie/guidelines.md with strict documentation style standards.
- Automated GraphQL schema concatenation for the MCP server using a schema-gen init-container.
- Updated MCP setup recipes in cookbook.md and mcp.md to reflect the new automation.
- Added .ai/mcp/mcp.json for connecting to existing MCP services via HTTP.
- Improved development workflow by updating package.json to watch .graphql files.
- Cleaned up the root directory by moving schema.graphql to .gitignore and removing redundant files.
- Standardized visual style and formatting across all markdown files.
This commit finalizes the documentation improvement plan by:
- Centralizing reference material in README.md.
- Creating a dedicated Technical Maintenance guide (docs/howtos/maintenance.md).
- Creating a categorized Sample Queries & Mutations overview (docs/queries/README.md).
- Eliminating redundant information across the doc set (DRY principle).
- Optimizing cross-references between reference documentation and the Cookbook.
- Updating the improvement plan to reflect all tasks as completed.
This commit upgrades the project to Node.js 24 (LTS) and performs a major refactoring of the documentation to support both advanced users and AI-based automation (MCP).
Changes:
- Environment & CI/CD:
- Set Node.js version to >=24 in package.json and .nvmrc.
- Updated Dockerfile to use Node 24 base image.
- Updated @types/node to ^24.10.9.
- Documentation:
- Refactored README.md with comprehensive technical reference, configuration details, and Zabbix-to-GraphQL mapping.
- Created docs/howtos/cookbook.md with practical recipes for common tasks and AI test generation.
- Updated docs/howtos/mcp.md to emphasize GraphQL's advantages for AI agents and Model Context Protocol.
- Added readme.improvement.plan.md to track documentation evolution.
- Enhanced all how-to guides with improved cross-references and up-to-date information.
- Guidelines:
- Updated .junie/guidelines.md with Node 24 requirements and enhanced commit message standards (Conventional Commits 1.0.0).
- Infrastructure & Code:
- Updated docker-compose.yml with Apollo MCP server integration.
- Refined configuration and schema handling in src/api/ and src/datasources/.
- Synchronized generated TypeScript types with schema updates.
- Moved GraphQL query samples into a new `docs/queries` directory for better organization.
- Added new queries and mutations, including `createHost.graphql` and `GetApiVersion.graphql`.
- Introduced `mcp-config.yaml` and updated `docker-compose.yml` for MCP integration.
- Updated IntelliJ `.idea/workspace.xml` settings to reflect project changes.
- Added new how-to guides (`docs/howtos`) for permissions, tags, MCP integration, and schema usage.
- Enhanced tests by updating file paths and improving sample data locations.
- Refined permissions and host group structures in `zabbix-hostgroups.ts` and `resolvers.ts`.
- Added a new section describing the Virtual Control Room (VCR) as a sample application.
- Explained how VCR utilizes key API features like hierarchical mapping, dynamic authorization, mass provisioning, and data visualization.
- Included a link to the technical product information PDF in the docs folder.
- Added VCR to the Key Features list.
- Removed 'Permissions/Library' and 'Permissions/Library/Item' from README.md hierarchy examples.
- Updated 'docs/sample_import_permissions_template_groups_mutation.graphql' to remove these groups from the sample import.
- Removed these groups from the 'TEMPLATEGROUP_EXPORT_DUMMY_TEMPLATE' in 'src/testdata/templates/zbx_default_templates_vcr.yaml'.
- Verified all 38 tests pass successfully.
- Added TSDoc for 'createHierarchicalValueFieldResolver'.
- Updated README with 'Extending the Schema' guide and Zabbix preconditions.
- Migrated all MQTT items to Agent 2 'mqtt.get' format across documentation and test data.
- Added 'docs/sample_import_distance_tracker_template.graphql' as a schema extension example.
- Verified all 38 tests pass.
(cherry picked from commit bff9ee6d2e)
- Added GraphQL sample queries and mutations for host and user rights endpoints in the 'docs' directory.
- Implemented unit tests for all remaining GraphQL endpoints, including hosts, devices, host groups, locations, and user permissions.
- Created dedicated integration tests for host and user rights workflows, utilizing the new sample files.
- Fixed a bug in 'HostImporter.getHostGroupHierarchyNames' to correctly process and sort nested host group hierarchies.
- Refined Zabbix API mocking in tests to improve reliability and support path-based routing.
- Verified all 38 tests across 11 suites pass successfully.
- Implemented GraphQL endpoints for importing, querying, and deleting Zabbix templates and template groups. - Added support for full template data import, including items, preprocessing steps, tags, and linked templates. - Implemented dependent item support by deferred creation logic in the template importer. - Added ability to query templates and template groups with name pattern filtering (supporting Zabbix wildcards). - Implemented batch deletion for templates and template groups by ID or name pattern. - Improved error reporting by including detailed Zabbix API error data in GraphQL responses. - Added comprehensive unit and integration tests covering all new functionality. - Provided GraphQL sample queries and mutations in the 'docs' directory for all new endpoints.