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

[Bug] ** Not working for inflixdb2 #42

Open
patrickelectric opened this issue Nov 28, 2023 · 4 comments
Open

[Bug] ** Not working for inflixdb2 #42

patrickelectric opened this issue Nov 28, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@patrickelectric
Copy link
Contributor

patrickelectric commented Nov 28, 2023

Describe the bug

When using curl -X GET http://localhost:8000/\*\* no data come from influxdb2 after a post method.
Different from influxdb

To reproduce

 docker run \
      -p 8086:8086 \
      -v myInfluxVolume:/var/lib/influxdb2 \
      influxdb:1.8

./zenohd -c influx.json5 --adminspace-permissions=rw

curl -X PUT -d '"Hello World!"' http://localhost:8000/demo/example/test 
curl -X GET http://localhost:8000/\*\* 

my influx.json5

{
  plugins: {
    storage_manager: {
      volumes: {
        influxdb: {
          // URL to the InfluxDB service
          url: "http://0.0.0.0:8086",
          private: {
            token: "eCqM_gNl9fbVZE4JeQTtcLgI28vGztI2yQJUn7Kf5c4m73JaweWbgZJvydvhRVtFvAHAhftIeegCDkQVsalZZA=="
          }
        }
      },
      storages: {
        demo: {
          key_expr: "demo/example/**",
          strip_prefix: "demo/example",
          volume: {
            id: "influxdb",
            db: "test",
            create_db: true,
            on_closure: "drop_db",
            private: {
              token: "eCqM_gNl9fbVZE4JeQTtcLgI28vGztI2yQJUn7Kf5c4m73JaweWbgZJvydvhRVtFvAHAhftIeegCDkQVsalZZA=="
            }
          }
        }
      }
    },
    rest: { http_port: 8000 }
  }
}

This steps work in influxdb but fail in influxdb2, the config need to change for influxdb since the username and password are required for this version.

System info

The zenoh router v0.10.0-rc built with rustc 1.72.0 (5680fa18f 2023-08-23)

                   -`                 
                  .o+`                 patrick@pichau
                 `ooo/                 OS: Arch Linux 
                `+oooo:                Kernel: x86_64 Linux 6.5.9-arch2-1
               `+oooooo:               Uptime: 14d 19h 34m
               -+oooooo+:              Packages: 2689
             `/:-:++oooo+:             Shell: zsh 5.9
            `/++++/+++++++:            Resolution: 7680x2160
           `/++++++++++++++:           DE: KDE 5.111.0 / Plasma 5.27.9
          `/+++ooooooooooooo/`         WM: KWin
         ./ooosssso++osssssso+`        GTK Theme:  [GTK2/3]
        .oossssso-````/ossssss+`       Icon Theme: bloom
       -osssssso.      :ssssssso.      Disk: 800G / 911G (92%)
      :osssssss/        osssso+++.     CPU: AMD Ryzen 7 2700 Eight-Core @ 16x 3.2GHz
     /ossssssss/        +ssssooo/-     GPU: NVIDIA GeForce GTX 1060 6GB
   `/ossssso+/:-        -:/+osssso+-   RAM: 33051MiB / 64247MiB
  `+sso+:-`                 `.-/+oso: 
 `++:.                           `-/+/
 .`                                 `/
@patrickelectric patrickelectric added the bug Something isn't working label Nov 28, 2023
@snehilzs
Copy link
Contributor

@patrickelectric Thanks for bringing this to our attention. I will look into it and get back to you.

@snehilzs
Copy link
Contributor

snehilzs commented Dec 1, 2023

Hi @patrickelectric ,
Influxdb 2.x doesn't support our current approach to get all entries (the ** expression) that was valid in 1.x. Our get_all_entries function should retrieve the last stored value per _measurement. For that we require access to the list of _measurement (key-expressions in case of zenoh) stored in the bucket and then iterate through the list items, querying for the last stored value for each. However, Influxdb 2.x doesn't provide the option to get the list of _measurement through their API. We are currently working on a workaround or alternative approach to provide this.

@patrickelectric
Copy link
Contributor Author

Thanks!

@samcarey
Copy link
Contributor

samcarey commented Mar 13, 2024

We are currently working on a workaround or alternative approach to provide this.

Any update on this? Does the workaround still seem possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants