You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
time="2020-11-10 06:34:45" level=debug msg="discovered measurement &{\x18.�\x1b\x00\v� map[]} on DB: prometheus-RP:autogen"
time="2020-11-10 06:34:45" level=debug msg="get fields query[show field keys from "\x18.�\x1b\x00\v�"],db[prometheus],meas[\x18.�\x1b\x00\v�]"
time="2020-11-10 06:34:45" level=debug msg="get fields from meas[\x18.�\x1b\x00\v�], response:[[]]"
panic: runtime error: index out of range [0] with length 0
code:
pkg/agent/client.go
if len(res[0].Series) == 0 {
log.Warnf("The response for Query is null, get Fields from DB %s Measurement %s error!\n", sdb, meas)
} else {
values := res[0].Series[0].Values
//show progress of getting measurements
for _, row := range values {
fieldname := row[0].(string)
fieldtype := row[1].(string)
fields[fieldname] = &FieldSch{Name: fieldname, Type: fieldtype}
log.Debugf("Detected Field [%s] type [%s] on measurement [%s]", fieldname, fieldtype, meas)
} }
} }
return fields return fields
log:
time="2020-11-10 06:34:45" level=debug msg="discovered measurement &{\x18.�\x1b\x00\v� map[]} on DB: prometheus-RP:autogen"
time="2020-11-10 06:34:45" level=debug msg="get fields query[show field keys from "\x18.�\x1b\x00\v�"],db[prometheus],meas[\x18.�\x1b\x00\v�]"
time="2020-11-10 06:34:45" level=debug msg="get fields from meas[\x18.�\x1b\x00\v�], response:[[]]"
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/toni-moreno/syncflux/pkg/agent.GetFields(0xbee080, 0xc00038aa90, 0xc00039a870, 0xa, 0xc00012c890, 0xb, 0xc00002f9a7, 0x7, 0xc0002ae000)
/home/golang/src/github.com/toni-moreno/syncflux/pkg/agent/client.go:256 +0x8fc
github.com/toni-moreno/syncflux/pkg/agent.(*HACluster).GetSchema(0xc000120f70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xb58088, 0xc0001cdd60, ...)
/home/golang/src/github.com/toni-moreno/syncflux/pkg/agent/hacluster.go:147 +0x8ea
github.com/toni-moreno/syncflux/pkg/agent.HAMonitorStart(0xc00012c2a0, 0xa, 0xc00012c380, 0xa)
/home/golang/src/github.com/toni-moreno/syncflux/pkg/agent/agent.go:247 +0x9b
main.main()
/home/golang/src/github.com/toni-moreno/syncflux/pkg/main.go:296 +0x53b
The text was updated successfully, but these errors were encountered: