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
I've created a PR for influxdb-php library introducing ability to write to TCP sockets, for example telegraf's ones - which allows me to write to a local socket instead of directly writing measurements to influxdb. (influxdata/influxdb-php#124)
I'm using a custom version of InfluxDBStorage class (monitoring) because the one from enqueue/monitoring always does try to create a database...
...which won't work in above case, because that socket is unable to handle database queries. I'm passing a custom client directly (as constructor $config variable)...
... but it appears that there is no way to pass configuration for measurements writing (since you can either pass a Client instance or config string/array).
I believe there should be a setter for configuration for this case? WDYT? Should using Client or Database instance be configurable as well / instead?
I've created a PR for influxdb-php library introducing ability to write to TCP sockets, for example telegraf's ones - which allows me to write to a local socket instead of directly writing measurements to influxdb. (influxdata/influxdb-php#124)
I'm using a custom version of InfluxDBStorage class (monitoring) because the one from enqueue/monitoring always does try to create a database...
enqueue-dev/pkg/monitoring/InfluxDbStorage.php
Lines 164 to 181 in 0652c5c
...which won't work in above case, because that socket is unable to handle database queries. I'm passing a custom client directly (as constructor
$config
variable)...enqueue-dev/pkg/monitoring/InfluxDbStorage.php
Lines 49 to 80 in 0652c5c
... but it appears that there is no way to pass configuration for measurements writing (since you can either pass a Client instance or config string/array).
I believe there should be a setter for configuration for this case? WDYT? Should using
Client
orDatabase
instance be configurable as well / instead?EDIT: For writing I'm replacing
enqueue-dev/pkg/monitoring/InfluxDbStorage.php
Line 112 in 0652c5c
with
since the currently used in php-enqueue code will call
Database
'shttps://github.com/influxdata/influxdb-php/blob/4a1efb43656a4f2b390201865cfe7051c895dff7/src/InfluxDB/Database.php#L162-L179
eventually anyway with passed
Points
as payload.The text was updated successfully, but these errors were encountered: