Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in unpoller #699

Open
yarafie opened this issue Apr 10, 2024 · 10 comments
Open

error in unpoller #699

yarafie opened this issue Apr 10, 2024 · 10 comments

Comments

@yarafie
Copy link

yarafie commented Apr 10, 2024

Starting getting the below error not sure when but at least a 2 to 3 weeks ago I was fine and was able to view graphs in grafana for influxdb. Prometheus seems to be working fine.

2024/04/10 09:24:11 [INFO] UniFi Measurements Exported. Site: 1, Client: 57, UAP: 2, USG/UDM: 3, USW: 0, DPI Site/Client: 1/94, Desc:
198, Metric: 10555, Err: 0, 0s: 771, Req/Total: 1.0125s / 1.0337s
2024/04/10 09:24:13 [ERROR] event fetch for InfluxDB failed: unifi.GetAlarms(): json: cannot unmarshal array into Go struct field Alarm.data.catname of type string: error initializing inputs

@declan727
Copy link

I am also seeing this issue. it seems like it might have started after an update on the Unifi side.

@yarafie
Copy link
Author

yarafie commented Apr 10, 2024

To get around this for now I set Alarm to false in the up.conf file.

@lslamp
Copy link

lslamp commented Apr 16, 2024

I had this issue. The problem is caused by influxdb, they have changed the data type of some of the data that is added into the databases. because the data type is not correct, it does not display the data shown in the db.

My solution was to update unpoller and the grafana templates and then all data was visible again.

I have a few threads about this exact same issue.
Lawrence

@yarafie
Copy link
Author

yarafie commented Apr 16, 2024

I had this issue. The problem is caused by influxdb, they have changed the data type of some of the data that is added into the databases. because the data type is not correct, it does not display the data shown in the db.

My solution was to update unpoller and the grafana templates and then all data was visible again.

I have a few threads about this exact same issue. Lawrence

I updated unpoller but not the grafana templates, will try that. What version of influxdb ate you using?

@lslamp
Copy link

lslamp commented Apr 19, 2024

InfluxDB shell version: 1.6.7~rc0

it was after the db upgrade that all my issues started.

Lawrence

@platinummonkey
Copy link
Contributor

there is a fix in progress

@platinummonkey
Copy link
Contributor

v2.11.2 might be able to fix this, but this might be a game of whack-a-mole

@cknic
Copy link

cknic commented May 18, 2024

I am still getting the issue for both Alarms and IDS. It prevents unpoller from writing to Influx. As soon as i set those to false, it works fine. I am on Unifi 4.0.7, unpoller 2.11.2 and influx 1.8.10

@sswensen
Copy link

@cknic I am in the same boat as well.

I did notice that when querying the controller for Alarms, all but one of the entries returned have a timestamp type as a number. One entry has a timestamp field with type String:

"timestamp": 1711549174,
"timestamp": "1712051846",

Casting the returned timestamp into a number, similar to the changes in this commit may resolve the unmarshaling error.

@platinummonkey
Copy link
Contributor

Thanks for the debug! I’ll shoot for a fix tomorrow unless you’re able to make a PR sooner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants