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.
This commit is contained in:
Andreas Hilbig 2026-02-03 13:29:42 +01:00
parent b646b8c606
commit 7c2dee2b6c
28 changed files with 6036 additions and 3088 deletions

View file

@ -0,0 +1,46 @@
### Mutation
Use this mutation to import a template for a simulated device that pushes GeoJSON data via Zabbix Trapper items.
```graphql
mutation ImportSimulatedBTTemplate($templates: [CreateTemplate!]!) {
importTemplates(templates: $templates) {
host
templateid
message
error {
message
}
}
}
```
### Variables
The following sample defines the `SIMULATED_BT_DEVICE` template. Note the `deviceType` tag set to `TrackedDevice`, which instructs the GraphQL API to resolve this host using the specialized `TrackedDevice` type.
We use the `state.current.json_geojson` key for the trapper item. The `json_` prefix ensures that the JSON string received from Zabbix is automatically parsed into a `JSONObject` by the GraphQL resolver.
```json
{
"templates": [
{
"host": "SIMULATED_BT_DEVICE",
"name": "Simulated BT Device",
"groupNames": ["Templates/Roadwork/Devices"],
"tags": [
{ "tag": "class", "value": "roadwork" },
{ "tag": "deviceType", "value": "TrackedDevice" }
],
"items": [
{
"name": "GeoJSON Data",
"type": 2,
"key": "state.current.json_geojson",
"value_type": 4,
"history": "7d",
"description": "Trapper item receiving GeoJSON payloads"
}
]
}
]
}
```