Open G9A2HvK9 opened 4 years ago
Could you please set scheme = "https"
and try again?
Also, what is the result of the following code (please change scheme, hostname and port accordingly) ?
library(httr)
res <- GET(url = "",
scheme = "https",
hostname = "host-address.com",
port = 8086,
path = "/ping")
res$all_headers
... which version of {influxdbr}
do you use?
packageVersion("influxdbr")
... and of course your sessionInfo()
could be helpful ;)
Could you please set
scheme = "https"
and try again?
Error: lexical error: invalid char in json text. <!doctype html>
<scr (right here) ------^Also, what is the result of the following code (please change scheme, hostname and port accordingly) ?
library(httr) res <- GET(url = "", scheme = "https", hostname = "host-address.com", port = 8086, path = "/ping") res$all_headers
[[1]] [[1]]$status [1] 200
[[1]]$version [1] "HTTP/2"
[[1]]$headers $date [1] "Tue, 03 Dec 2019 15:12:29 GMT"
$content-type
[1] "text/html"
$last-modified
[1] "Mon, 25 Nov 2019 20:39:29 GMT"
$etag [1] "W/\"5ddc3c01-3ae\""
$content-encoding
[1] "gzip"
$strict-transport-security
[1] "max-age=15724800; includeSubDomains"
attr(,"class") [1] "insensitive" "list"
... which version of
{influxdbr}
do you use?packageVersion("influxdbr")
packageVersion('influxdbr') [1] ‘0.14.2’
... and of course your
sessionInfo()
could be helpful ;)
R version 3.6.1 (2019-07-05) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Catalina 10.15.1
Matrix products: default BLAS: /Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] httr_1.4.1 jsonlite_1.6 rjson_0.2.20 xts_0.11-2 zoo_1.8-6 influxdbr_0.14.2 dplyr_0.8.3
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 lattice_0.20-38 crayon_1.3.4 assertthat_0.2.1 grid_3.6.1 R6_2.4.0 magrittr_1.5 pillar_1.4.2 rlang_0.4.0 curl_4.2 rstudioapi_0.10 tools_3.6.1
[13] glue_1.3.1 purrr_0.3.3 compiler_3.6.1 pkgconfig_2.0.3 tidyselect_0.2.5 tibble_2.1.3
Thanks. Do you know which InfluxDB is behind InfluxDB Cloud (i.e. 1.x or 2.0)? influxdbr
is currently not compatible with InfluxDB 2.0 (but I am in contact with InfluxData).
No probs. Thank you! The InfluxDB Cloud is using 2.0 -- I guess this means we're at an impass here. Would love an update if / when you manage to integrate.
Thanks for all your work in this package. It's really interesting, and I'm sure it'll be super useful once I can get our InfluxDB to run.
Any news on influxdb v2 compatibility?
no
Hi. Thank you for your work on this package, it's extremely helpful. Is there any info about when Influx 2.0 compatibility might come?
Thanks. Unfortunately, I won‘t work on this. Please see my response to #63.
@dleutnant, can you explain briefly what we have to do to support InfluxDB 2.0 ?
@bilbaoba Well, I'd suggest to contact people at InfluxData and seek for some guidance in this respect. My experience with InfluxDB is limited to the 1.x versions.
InfluxDB 2 has a completely different interface, however, it has a backward compatibility layer below /query and /write . I managed to debug the problem by using httr::set_config(verbose())
and trying out the queries using curl. For me the nastiest part was getting authentication to work. First tried the token scheme, but this does not work since influxdbr always emits user name and password even if not set. So one has to create an auth user.
see docs here: https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/manual-upgrade/
Other than that one needs to create a mapping for influx 1 DBs to influx 2 buckets manually, which is also described.
The 2.0 API is totally different and uses a different query language (flux), so I would really suggest a fork of the library instead of generating compat interfaces (one in the client and one in the server)
Seems that it works for me now including the show_databases(con)
.
(I work for Influxdata.)
InfluxDB 2 has a completely different interface, however, it has a backward compatibility layer below /query and /write
This is correct. The client should work for basic write and query endpoints against 2.x. The compatibility endpoints (including for influxql) are documented here: https://docs.influxdata.com/influxdb/cloud/reference/api/influxdb-1x/
Hi Dominik,
Ich beschäftige mich ehrlicher Weise gerade zum ersten Mal mit diesr Thematik. Ich versuche ein Influx DB mit R Studio zu verbinden. Das Influx DB läuft derzeit auf der Influx Cloud. Dazu lasse ich folgenden Code laufen:
Habe versucht verschiedene JSON leser auf das Ergebnisse anzusetzen. Bisher ohne Erfolg. ist hier etwas grundlegend falsch?
debug gibt folgendes Ergebnis:
Danke und VG.