Import data from ceph plugin that uses v1 api

Ceph sends data to influx using v1 api

I am reading v2 documentation but it is not evident to me how to create user,password and db in influxdb V2.


Hello @mgiammarco,
Yes I agree. It’s confusing. I plan to write a tutorial on it soon.
In order to query v1 with the v2api you need to:

  1. Have a CLI config for v2 (this will just make your life a lot easier than constantly executing curl commands)
  2. Set up a username and password in v2
    The easiest way to do this is through the UI in my opinion
  3. Create a Database Retention Policy mapping (DBRP mapping) for unmapped buckets

Now you can query InfluxDB 2 with InfluxQL :slight_smile: and write data to Influxdb 2

1 Like

I still not understand.
In addition in this link

The command “influx v1 dbrp create …” does not exist.
And the “–db” param does not work (unknown flag).
I still not understand what happens if I upgrade an influxdb 1.7 to 2.0. Do I lose all previous configs?

Hello @mgiammarco,
Oh yes sorry that’s for backward compatibility. My apologies, I think I got confused somewhere. If you have 2.x CLI you can still query a 1.x instance.

If you upgrade:
You will not loose databases or data.
You will loose CQs and Kapacitor Tasks.
You can convert CQs and Kapacitor batch tasks.
Please take a look at this:

The easiest way create a username and password is through the UI. For v2 InfluxDB and Chronograf have been merged into just InfluxDB which runs on localhost:8086. If you install InfluxDB v2, run it, and visit 8086, then you can access the InfluxDB UI (v2 terminology) and configure there.

Does any of that help you more? Please let me know what I’m missing.

Sorry I have put too many similar arguments on the same request.
Please consider only this use case:

  • I have just installed an InfluxDB 2.0 but I have many agents that sends data using InfluxDB 1.7 protocol.

So there are no buckets just “old” type calls, someone also without authentication. Most third party software (Ceph, Riemann, and so on) does not support InfluxDB 2.0 protocol and authentication.
Please tell me how to enable 1.7 compatibility mode.

Hello @mgiammarco,
The process is documented here:

Specifically in this section:

Sorry again but just to be more clear:

  • influxdb 2.0
  • client 1.7

Client does not know that I have changed influxdb version with the newest one. It must work the same.
It seems to me the first use case (retro compatibility) to support.

Any news for this? It is a blocking situation if you cannot receive data from v1 clients

@mgiammarco influxdb v2.x supports the 1.x API. I think @Anaisdg has linked to all the relevant docs above, but I’ll summarize here for clarity.

The 1st question is: are you setting up a brand-new instance of 2.x, or upgrading an existing 1.x deployment? If you’re upgrading, you can use the influxd upgrade command on the 2.x binary to migrate all of your data and users. The result should Just Work from the client’s perspective.

If you’re setting up a fresh instance, it’ll be a bit more work.

  1. Use influx setup or the UI to create your initial user/org/bucket in the 2.x instance
  2. Create a new V1 username/password pair using influx v1 auth create. See the docs here
  3. Create a new V1 DBRP mapping using influx v1 dbrp create. The value you pass for --bucket-id here must be the ID of the bucket you first created via influx setup / the UI. You can get the ID using influx bucket list. See docs for the dbrp command here
  4. Configure your client with the V1 username/password you passed as input to influx v1 auth create, and the DB/RP you passed as input to influx v1 dbrp create

I see you mention that you got a “command does not exist” error when trying to run dbrp create. That command was added in v2.0.2, and additional fixes & improvements were added in v2.0.3. I’d recommend pulling the latest of V2 before trying again.

1 Like