coraxx / netdata_ts3_plugin

NetData plugin for polling active users on TeamSpeak 3 servers.
MIT License
39 stars 7 forks source link

Fixed packet loss metric not working & init error can't set attribute "self.name" #4

Closed vennekilde closed 6 years ago

vennekilde commented 6 years ago

I was unable to get the script to run, due to the startup error python.d ERROR: plugin: main: job initialization: 'ts3 local' => [FAILED] (can't set attribute)

Removing self.name = "Teamspeak 3 Server" solved that issue

I also noticed that packet drop was not working either and was always reporting 0 for all metrics It seems netdata only stores integer values, and since the packet loss data is between 1 and 0, it was always reporting 0

This was solved by multiplying the data with a factor of 10^5 and then store it as an integer. It would then be scaled back down to the correct factor in the UI when being displayed

Image of Yaktocat

vennekilde commented 6 years ago

I am new to github pull requests, but it seems it also adds my newer changes to the request

Anyway i fixed that the query client would constantly spam the ts3 server log with disconnects, when it would reconnect each time it would query for data

coraxx commented 6 years ago

Thank you for the pull request. I’m in between internet connections at the moment, sorry ^^ but I will take care of merging this by the end of this week. Cheers