Speedtest-Tracker icon indicating copy to clipboard operation
Speedtest-Tracker copied to clipboard

Add Influxdb Connection

Open MDHMatt opened this issue 4 years ago • 10 comments

Would be great if we could get a output to influxdb.

MDHMatt avatar Mar 03 '21 10:03 MDHMatt

+1 i did something like this a while ago but your solutions seem way better. My newer try and my older one

fenpaws avatar Mar 06 '21 14:03 fenpaws

Not merging the PR yet (need to write the wrapper for the influxdb version 2 client first), but have a look here. This the info you want in influx?

henrywhitaker3 avatar Apr 10 '21 21:04 henrywhitaker3

How can i check if the Settings for InfluxDB are correct? I made Docker, the port is reachable - but there is no connection i think. Do i have to use another "driver" in the docker-compose.yml? Now i use the standard File from your Page.

root9191 avatar Apr 18 '21 13:04 root9191

I'll add a test connection button next time I work on this. To manually check this atm, you can get a shell in the container and run:

php /config/www/artisan tinker
App\Utils\InfluxDB\InfluxDB::connect()

If the output looks something like this:

>>> App\Utils\InfluxDB\InfluxDB::connect()
=> App\Utils\InfluxDB\InfluxDB {#3553}

Then the connection works, if it doesn't you should see an error in there

henrywhitaker3 avatar Apr 19 '21 15:04 henrywhitaker3

Thank you for your Help! Unfortunately i do not have a connection to the DB. Can you show how you made it work?

root9191 avatar Apr 19 '21 23:04 root9191

Which version of influx are you using? I've only written the adapter for v1 so far

henrywhitaker3 avatar Apr 21 '21 15:04 henrywhitaker3

My output is: App\Exceptions\InfluxDBNotEnabledException

Curiously, when I enable or disable the INflux integration in settings the pop-up windows always says "enabled or disabled heathchecks.io" section. I'm not sure if that's just an incorrect message or if the entire integration isn't enabled.

funnelcloudservices avatar May 29 '21 13:05 funnelcloudservices

Hey @funnelcloudservices,

Just started using speedtest, you have to disable Influx in the UI (The checkbox is enabled) and after that re-enable it. This got the connection working for me

NigelVanHattum avatar Sep 11 '21 19:09 NigelVanHattum

Works with InfluxDb 1.8.10 I tried shell commands mentionned by @henrywhitaker3 Didn't work at first, but ok after some disabled/enabled as @NigelVanHattum said

root@09085a37bca5:/# php /config/www/artisan tinker
Psy Shell v0.10.6 (PHP 7.4.15 — cli) by Justin Hileman

>>> App\Utils\InfluxDB\InfluxDB::connect()
App\Exceptions\InfluxDBNotEnabledException

>>> App\Utils\InfluxDB\InfluxDB::connect()
App\Exceptions\InfluxDBNotEnabledException

>>> App\Utils\InfluxDB\InfluxDB::connect()
=> App\Utils\InfluxDB\InfluxDB {#3524}

>>> App\Utils\InfluxDB\InfluxDB::connect()
=> App\Utils\InfluxDB\InfluxDB {#3557}

>>> App\Utils\InfluxDB\InfluxDB::connect()
=> App\Utils\InfluxDB\InfluxDB {#3585}

srobert72 avatar Nov 20 '21 10:11 srobert72

It would be very nice if support for InfluxDB 2 would be added too. Is it planned?

ttenroK avatar Jan 01 '22 17:01 ttenroK