From 7c2dee2b6c30aa63c4589692f1ac8657db59b006 Mon Sep 17 00:00:00 2001 From: Andreas Hilbig Date: Tue, 3 Feb 2026 13:29:42 +0100 Subject: [PATCH] feat: implement history push mutation and enhanced MCP logging - 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. --- .idea/workspace.xml | 43 +- README.md | 8 +- docker-compose.yml | 5 + docs/howtos/cookbook.md | 156 + docs/howtos/mcp.md | 14 + docs/queries/README.md | 3 + ...ample_import_simulated_bt_template.graphql | 46 + .../sample_push_geojson_history.graphql | 470 + .../sample_tracked_device_query.graphql | 19 + docs/tests.md | 4 + .../VCR - Technical product information.pdf | 7653 ++++++++++------- .../trade-fair-logistics-requirements.md | 2 +- mcp-config.yaml | 4 + .../location_tracker_devices.graphql | 28 + schema/mutations.graphql | 48 + src/api/resolvers.ts | 17 + src/api/start.ts | 20 + src/common_utils.ts | 1 + src/datasources/zabbix-history.ts | 76 +- src/datasources/zabbix-items.ts | 1 - src/datasources/zabbix-request.ts | 3 +- src/execution/host_exporter.ts | 3 +- src/execution/regression_test_executor.ts | 48 + src/schema/generated/graphql.ts | 64 + src/test/history_push.test.ts | 66 + src/test/history_push_integration.test.ts | 127 + .../templates/zbx_default_templates_vcr.yaml | 105 +- .../templates/zbx_device_tracker_vcr.yaml | 90 + 28 files changed, 6036 insertions(+), 3088 deletions(-) create mode 100644 docs/queries/sample_import_simulated_bt_template.graphql create mode 100644 docs/queries/sample_push_geojson_history.graphql create mode 100644 docs/queries/sample_tracked_device_query.graphql rename docs/{ => use-cases}/VCR - Technical product information.pdf (76%) create mode 100644 src/test/history_push.test.ts create mode 100644 src/test/history_push_integration.test.ts create mode 100644 src/testdata/templates/zbx_device_tracker_vcr.yaml diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8f6b5aa..d1b9822 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,34 +5,30 @@ - - - + + + - - + - - - - - - + + + - - - - + + + + + + - - - + - @@ -111,7 +107,7 @@ "go.import.settings.migrated": "true", "javascript.preferred.runtime.type.id": "node", "junie.onboarding.icon.badge.shown": "true", - "last_opened_file_path": "//wsl.localhost/Ubuntu/home/ahilbig/git/vcr/zabbix-graphql-api/docs", + "last_opened_file_path": "//wsl.localhost/Ubuntu/home/ahilbig/git/vcr/zabbix-graphql-api/docs/use-cases", "node.js.detected.package.eslint": "true", "node.js.detected.package.tslint": "true", "node.js.selected.package.eslint": "(autodetect)", @@ -139,11 +135,11 @@ + - @@ -195,9 +191,9 @@ - + @@ -235,6 +231,7 @@ +