zabbix-graphql-api/schema/extensions/display_devices.graphql
Andreas Hilbig 5da4a17e36 feat: implement weather sensor extension and enhance device interfaces
This change introduces the Weather Sensor device type which retrieves data from public APIs, and enhances the core Host/Device interfaces to provide consistent access to inventory and items across all specialized device types. It also improves search logic and fixes several bugs identified during implementation.

- Weather Sensor Extension: Added schema and recipe for a device retrieving weather data via Zabbix HTTP agent items.

- Interface Enhancements: Added inventory and items fields to Host and Device interfaces to ensure all device specialized types have consistent access to monitoring and inventory data.

- Search Logic Improvements: Enhanced ParsedArgs to support searchByAny and technical name (host) searches when a name pattern is provided.

- Bug Fixes:

  - Fixed getLocations argument order in the Zabbix API datasource.

  - Implemented deduplication for groupids and templateids in HostImporter to prevent Zabbix duplicate value errors.

  - Added missing url field to CreateTemplateItem for HTTP Agent item support.

- Testing:

  - Extended the regression test suite with 4 new automated checks covering the fixed bugs.

  - Updated Jest tests to accommodate the improved search parameters.

- Documentation: Updated cookbook and test specifications to reflect new features and regression testing obligations.
2026-02-01 06:56:23 +01:00

115 lines
3 KiB
GraphQL

"""
SinglePanelDevice represents a device which can display a single picture, e.g. using LED technology.
The picture is represented either by a displaySign (a numeric value e.g. the index of the picture)
or a contentKey, which is usually the hash of the bitmap which shall be displayed.
"""
type SinglePanelDevice implements Host & Device {
hostid: ID!
"""
Per convention a uuid is used as hostname to identify devices if they do not have a unique hostname
"""
host: String!
deviceType: String
hostgroups: [HostGroup!]
name: String
tags: DeviceConfig
inventory: Inventory
items: [ZabbixItem!]
state: PanelState
}
"""
Represents the state of a single panel device.
"""
type PanelState implements DeviceState {
"""Operational data (telemetry)."""
operational: OperationalDeviceData
"""Current display state."""
current: PanelCurrentState
}
"""
Represents the current state of a panel.
"""
type PanelCurrentState {
"""The current values being displayed on the panel."""
values: PanelValues
}
"""
Specific values displayed on a panel.
"""
type PanelValues {
"""
Index of the bitmap which is displayed.
"""
contentIndex: Int
"""
Hash of the bitmap which is displayed.
"""
contentKey: String
"""
Text representation of what is displayed.
"""
contentText: String
}
"""
The FourPanelDevice is a panel which allows to define pictures in 4
subpanels, called TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT.
"""
type FourPanelDevice 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 four-panel device."""
state: FourPanelState
}
"""
Represents the state of a four-panel device.
"""
type FourPanelState implements DeviceState {
"""Operational data (telemetry)."""
operational: OperationalDeviceData
"""Current state of all four panels."""
current: FourPanelCurrentState
}
"""
Represents the combined current state of four panels.
"""
type FourPanelCurrentState {
"""The values for each of the four panels."""
values: FourPanelValues
}
"""
Values for each of the four panels in a FourPanelDevice.
"""
type FourPanelValues {
"""State of the top-left panel."""
TOP_LEFT: PanelValues
"""State of the top-right panel."""
TOP_RIGHT: PanelValues
"""State of the bottom-left panel."""
BOTTOM_LEFT: PanelValues
"""State of the bottom-right panel."""
BOTTOM_RIGHT: PanelValues
}