From 61509c00000690189b3c3c913dec7117abb39f63 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 10 Feb 2025 15:40:37 +0100 Subject: [PATCH] queries --- queries/hottis.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/queries/hottis.sql b/queries/hottis.sql index 80a2f98..8d4ea42 100644 --- a/queries/hottis.sql +++ b/queries/hottis.sql @@ -129,3 +129,20 @@ create or replace view lora_sht21_v as where m.application = 'de-hottis-app01' and m.attributes->>'DeviceType' = 'hottis-gy21' and m.device = d.label; + +create or replace view ntp_server_snmp_v as + select time, + device, + cast(values->'load1'->>'value' as float) as laLoad1, + cast(values->'lan-in'->>'value' as int) as lanInOctetsPerSeconds, + cast(values->'lan-out'->>'value' as int) as lanOutOctetsPerSeconds + from measurements + where application = 'SNMP' and device = '172.16.13.10'; + +create or replace view ntp_server_variables_v as + select time, + device, + cast(values->'rootdisp'->>'value' as float) as rootdisp + from measurements + where application = 'TSM' and device = '172.16.13.10'; +