From 6b08971bcff61fa073bcf686d54f1167f58fe1b3 Mon Sep 17 00:00:00 2001 From: Shark Date: Wed, 4 Dec 2024 22:04:29 +0300 Subject: [PATCH] fix input bat --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index e633df2..2e9ba0c 100644 --- a/main.go +++ b/main.go @@ -179,6 +179,10 @@ func starts(params *gosnmp.GoSNMP, config *Config) { } + if toExport["upsESystemInputVoltage"].(int64) <= 0 { + delete(toExport, "upsESystemInputVoltage") + } + go PushData(toExport, tm) time.Sleep(time.Second * time.Duration(config.SNMP.Repeat))