do not send alerts when there are no metrics
This commit is contained in:
parent
efc9864613
commit
dac9b4ac2f
|
|
@ -284,6 +284,8 @@ func vbat2percent(vbat string) int {
|
|||
func getLastMetrics(deveui string) OneMetric {
|
||||
var res OneMetric
|
||||
|
||||
res.BatteryPercent = "999"
|
||||
|
||||
url := "http://localhost:8086/api/v2/query?org=wobischorg"
|
||||
data := []byte(fmt.Sprintf(`from(bucket:"wobischbucket")
|
||||
|> range(start:-5d)
|
||||
|
|
|
|||
Loading…
Reference in New Issue