feat: optimize Zabbix queries and enhance specialized device support

- 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.
This commit is contained in:
Andreas Hilbig 2026-02-02 13:20:06 +01:00
parent 97a0f70fd6
commit b646b8c606
28 changed files with 551 additions and 74 deletions

View file

@ -0,0 +1,74 @@
"""
Represents the payload for a sensor distance measurement.
"""
type SensorDistanceValue implements DeviceValue {
"""
Represents the name of the device that reports or provides distance sensor data.
Uniquely identifies the device within the context of the SensorDistanceValue.
"""
deviceName: String
"""
Represents the MAC address of the device. Typically formatted as a 12-character
hexadecimal string (e.g. "00:1A:2B:3C:4D:5E").
"""
mac: String
"""
Represents the measured or calculated distance value, typically in meters.
Should be non-negative.
"""
distance: Float
"""
Represents the time at which the sensor measurement was recorded.
"""
time: String
"""
Dummy field to allow for empty interfaces.
"""
_empty: String
}
"""
Represents a coordinate in 3D space with x, y, and z components.
"""
type Position {
"""X coordinate."""
x: Float
"""Y coordinate."""
y: Float
"""Z coordinate."""
z: Float
}
"""
Represents the result of a position calculation, including the calculated position and accuracy.
"""
type PositionCalculatorResult {
"""The calculated 3D position."""
position: Position
"""The estimated accuracy of the calculation."""
accuracy: Float
}
"""
Concrete implementation of a DeviceValueMessage for sensor distance data.
"""
type SensorDistanceMessage implements DeviceValueMessage {
"""The unique identifier of the device."""
deviceKey: String
"""Timestamp of the message."""
timestamp: String
"""Name of the attribute."""
attributeName: String
"""Name of the topic."""
topicName: String
"""Type of the device."""
deviceType: String
"""The sensor distance value payload."""
value: SensorDistanceValue
}