feat: add GroundValueChecker and WeatherSensorDevice with public API integration
This commit introduces two new device types, GroundValueChecker and WeatherSensorDevice, which leverage public APIs (BORIS NRW and Open-Meteo) for real-time data collection. It also includes several API enhancements and fixes to support these new integrations. Detailed changes: - **New Device Types**: - Added GroundValueChecker schema and integration with BORIS NRW WMS via Zabbix Script items. - Added WeatherSensorDevice schema and integration with Open-Meteo via Zabbix HTTP Agent items. - **API Enhancements**: - Added error field to ZabbixItem for item-level error reporting. - Updated CreateTemplateItem mutation input to support params (for Script items) and timeout. - Registered missing scalar resolvers: JSONObject, DateTime, and Time. - **Performance & Reliability**: - Implemented batch fetching for item preprocessing in both host and template queries to reduce Zabbix API calls and ensure data visibility. - Updated template_importer.ts to correctly handle Script item parameters. - **Documentation**: - Consolidated public API device recipes in docs/howtos/cookbook.md. - Added guidance on analyzing data update frequency and setting reasonable update intervals (e.g., 1h for weather, 1d for ground values). - **Testing**: - Added new regression test REG-ITEM-META to verify item metadata (units, description, error, preprocessing) and JSONObject scalar support. - Enhanced RegressionTestExecutor with more detailed host-item relationship verification.
This commit is contained in:
parent
41e4c4da1f
commit
ad104acde2
13 changed files with 378 additions and 45 deletions
|
|
@ -39,7 +39,7 @@ The following variables define the `WEATHER_SENSOR` template. It uses the host's
|
|||
"key": "weather.get",
|
||||
"value_type": 4,
|
||||
"history": "0",
|
||||
"delay": "1m",
|
||||
"delay": "1h",
|
||||
"url": "https://api.open-meteo.com/v1/forecast?latitude={$LAT}&longitude={$LON}¤t=temperature_2m,weather_code",
|
||||
"description": "Master item fetching weather data from Open-Meteo based on host coordinates."
|
||||
},
|
||||
|
|
@ -49,6 +49,8 @@ The following variables define the `WEATHER_SENSOR` template. It uses the host's
|
|||
"key": "state.current.temperature",
|
||||
"value_type": 0,
|
||||
"history": "7d",
|
||||
"units": "°C",
|
||||
"description": "The current temperature at the device location.",
|
||||
"master_item": {
|
||||
"key": "weather.get"
|
||||
},
|
||||
|
|
@ -65,6 +67,7 @@ The following variables define the `WEATHER_SENSOR` template. It uses the host's
|
|||
"key": "state.current.streetConditionWarnings",
|
||||
"value_type": 4,
|
||||
"history": "7d",
|
||||
"description": "Human-readable weather warnings or descriptions derived from weather codes.",
|
||||
"master_item": {
|
||||
"key": "weather.get"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue