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

@ -127,6 +127,22 @@ type Mutation {
name_pattern: String
): [DeleteResponse!]
"""
Pushes history data to Zabbix (ZABBIX_TRAP items).
Authentication: Requires `zbx_session` cookie or `zabbix-auth-token` header.
"""
pushHistory(
"""Item ID to push data to."""
itemid: Int,
"""Item key to push data to (required if itemid is empty)."""
key: String,
"""Host name the item belongs to (required if itemid is empty)."""
host: String,
"""Values to push."""
values: [HistoryPushInput!]!
): HistoryPushResponse
"""
Runs a smoketest: creates a template, links a host, verifies it, and cleans up.
"""
@ -770,3 +786,35 @@ type ImportUserRightResult {
errors: [ApiError!]
}
"""
Input for pushing history data.
"""
input HistoryPushInput {
"""Timestamp of the value."""
timestamp: DateTime!
"""The value to push (JSON object)."""
value: JSONObject!
}
"""
Response object for pushHistory operation.
"""
type HistoryPushResponse {
"""Overall status message."""
message: String
"""Error information if the operation failed."""
error: ApiError
"""Detailed results for each pushed value."""
data: [HistoryPushData!]
}
"""
Detailed result for a single pushed value.
"""
type HistoryPushData {
"""The Zabbix item ID."""
itemid: String
"""Error information if the push failed for this item."""
error: ApiError
}