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:
parent
97a0f70fd6
commit
b646b8c606
28 changed files with 551 additions and 74 deletions
46
samples/extensions/ground_value_checker.graphql
Normal file
46
samples/extensions/ground_value_checker.graphql
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
"""
|
||||
GroundValueChecker represents a device that retrieves ground values
|
||||
from public APIs (e.g. BORIS NRW) using Zabbix HTTP agent items.
|
||||
"""
|
||||
type GroundValueChecker implements Host & Device {
|
||||
"""Internal Zabbix ID of the device."""
|
||||
hostid: ID!
|
||||
"""
|
||||
Per convention a uuid is used as hostname to identify devices if they do not have a unique hostname.
|
||||
"""
|
||||
host: String!
|
||||
"""Classification of the device."""
|
||||
deviceType: String
|
||||
"""List of host groups this device belongs to."""
|
||||
hostgroups: [HostGroup!]
|
||||
"""Visible name of the device."""
|
||||
name: String
|
||||
"""Device configuration tags."""
|
||||
tags: DeviceConfig
|
||||
"""Host inventory data."""
|
||||
inventory: Inventory
|
||||
"""List of monitored items for this host."""
|
||||
items: [ZabbixItem!]
|
||||
"""State of the ground value checker device."""
|
||||
state: GroundValueState
|
||||
}
|
||||
|
||||
"""
|
||||
Represents the state of a ground value checker device.
|
||||
"""
|
||||
type GroundValueState implements DeviceState {
|
||||
"""Operational data (telemetry)."""
|
||||
operational: OperationalDeviceData
|
||||
"""Current business values (ground data)."""
|
||||
current: GroundValues
|
||||
}
|
||||
|
||||
"""
|
||||
Aggregated ground information retrieved from the API.
|
||||
"""
|
||||
type GroundValues {
|
||||
"""
|
||||
Average ground value (in €/m²). Extracted from the BORIS NRW GeoJSON response.
|
||||
"""
|
||||
averageValue: Float
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue