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

Error sending samples to remote storage #3732

Open
gangsta opened this Issue Jan 24, 2018 · 19 comments

Comments

Projects
None yet
6 participants
@gangsta
Copy link

gangsta commented Jan 24, 2018

Hi ,

Getting

Jan 24 15:15:51 prometheus prometheus: level=warn ts=2018-01-24T14:15:51.973934966Z caller=queue_manager.go:485 component=remote msg="Error sending samples to remote storage" count=100 err="server returned HTTP status 400 Bad Request: proto: wrong wireType = 2 for field StartTimestampMs"
  • prometheus.yaml
remote_read:
- url: http://localhost:9201/write
remote_write:
- url: http://localhost:9201/read
  • remote_stroage_adapter
/usr/sbin/remote_storage_adapter \
  -influxdb-url=http://domain.com:8086/ \
  -influxdb.database=db \
  -influxdb.retention-policy=autogen \
  -influxdb.username=user \
  -send-timeout=30s
  • influxdb
version: influxdb-1.4.2

# Influxdb 
influx 
auth  
CREATE DATABASE db; 
CREATE USER "user" with password 'psswd'; 
GRANT ALL ON db TO user; 
ALTER RETENTION POLICY "autogen" ON "db" DURATION 1d REPLICATION 1 SHARD DURATION 1d DEFAULT;
SHOW RETENTION POLICIES ON db;
#shown above retention

SHOW MEASUREMENTS;
# nothings is shown
  • Prometheus
version: 
[root@prometheus ~]# prometheus --version
prometheus, version 2.1.0 (branch: HEAD, revision: 85f23d82a045d103ea7f3c89a91fba4a93e6367a)
  build user:       root@6e784304d3ff
  build date:       20180119-12:01:23
  go version:       go1.9.2
@tomwilkie

This comment has been minimized.

Copy link
Member

tomwilkie commented Feb 1, 2018

Thanks for the report @kalinux. I think the remote storage adapters have rotted a little. As of influx v1.4.0 you don't need the remote storage adapter IIRC, influx supports our remote read/write APIs natively.

@gangsta

This comment has been minimized.

Copy link
Author

gangsta commented Feb 1, 2018

Hi @tomwilkie
Can you give me prometheus.yaml example (or point to some documentation) how to configure Prometheus with Influxdb ?
as far as I can find documentation it touches remote_storage_adapter

Regards
Karen

@gangsta

This comment has been minimized.

Copy link
Author

gangsta commented Feb 1, 2018

Or you meant ?

remote_read:
- url: http://domain.com:8086/
remote_write:
- url: http://domain.com:8086/
@tomwilkie

This comment has been minimized.

Copy link
Member

tomwilkie commented Feb 1, 2018

I've not used it before, but this blog post has some details: https://www.influxdata.com/blog/influxdb-now-supports-prometheus-remote-read-write-natively/

@fmoessbauer

This comment has been minimized.

Copy link

fmoessbauer commented Feb 4, 2018

By now there is also official documentation on how to use the native API: https://docs.influxdata.com/influxdb/v1.4/supported_protocols/prometheus#prometheus-remote-read-and-write-api-support

However until influxdata/influxdb#9244 is not resolved, the native backend is not backwards compatible with the remote_storage_adapter.

@gangsta

This comment has been minimized.

Copy link
Author

gangsta commented Feb 5, 2018

Hi @tomwilkie @fmoessbauer , so that means we can close this issue until InfluxDB fixes issue/adds feature ?

@fmoessbauer

This comment has been minimized.

Copy link

fmoessbauer commented Feb 6, 2018

@kalinux this depends on how the prometheus team is going to proceed with the remote_storage_adapter. If support is going to be dropped in favor of the influxdb native one, this issue should be at least documented as a known error.

@tomwilkie

This comment has been minimized.

Copy link
Member

tomwilkie commented Feb 6, 2018

I chatted to @brian-brazil this weekend at FOSDEM and remote_storage_adapter is going to hang around a little longer, as it serves as a good example. I'm going to update it, add it to our CI etc. I'll chat to influx and see if we should remove the influx path from the adapter or not.

@gangsta

This comment has been minimized.

Copy link
Author

gangsta commented Feb 6, 2018

@tomwilkie the same from me , chatted with @brian-brazil at FOSDEM about how to solve this Influxdb and remote_storage_adapter story , seems only way so far is just to use url: influxdburl+credentials cause Influxdb is not providing basic http authentication . so to me its more in Influxdb side ?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 6, 2018

@kalinux That's a different problem you're thinking of.

I note that our influx adpater is the only example of a read adapter we have, though others (such as the CrateDB adapter) also exist out there.

@gangsta

This comment has been minimized.

Copy link
Author

gangsta commented Feb 6, 2018

so what is solution ? use remote_storage_adapter or not ? use url: influxdb+credentials or not ?

@simonszu

This comment has been minimized.

Copy link

simonszu commented Feb 21, 2018

When referring to the original issue in the first post, i now have the same problem as well. I won't drop remote_storage_adapter from my setup until InfluxDB fixes the bug @fmoessbauer mentioned - although it seems that for now i have to live without influxdb integration at all.

@gangsta

This comment has been minimized.

Copy link
Author

gangsta commented Feb 21, 2018

@simonszu you can use as temporary solution putting all in URL, that's works for as well, but again - as temporary solution.

@simonszu

This comment has been minimized.

Copy link

simonszu commented Feb 21, 2018

What do you mean @kalinux ? Adding username and password as GET parameters to the remote storage adapter url?

@gangsta

This comment has been minimized.

Copy link
Author

gangsta commented Feb 21, 2018

copied from Docs.

# Remote write configuration (for Graphite, OpenTSDB, or InfluxDB).
remote_write:
* url: "http://localhost:8086/api/v1/prom/write?u=paul&p=foo&db=prometheus"
# Remote read configuration (for InfluxDB only at the moment).
remote_read:
* url: "http://localhost:8086/api/v1/prom/read?u=paul&p=foo&db=prometheus"

Insecure I know , but there is no other solution so far ,

@simonszu

This comment has been minimized.

Copy link

simonszu commented Feb 21, 2018

Yeah, ok, this is for InfluxDBs new native Prometheus API. Unfortunately there's influxdata/influxdb#9244 which causes the data sent by Prometheus not properly written into InfluxDBs storage.

@weih1214

This comment has been minimized.

Copy link

weih1214 commented Jun 28, 2018

seems only way so far is just to use url: influxdburl+credentials cause Influxdb is not providing basic http authentication . so to me its more in Influxdb side

@gangsta Does this mean that basic_auth config doesn't work at all?

@weih1214

This comment has been minimized.

Copy link

weih1214 commented Jun 28, 2018

Hi all, I am trying to config adapter for prometheus. I want to use basic_auth for the authentication, but I got error from adapter "err="{"error":"unable to parse authentication credentials"}", which I guess is something wrong in the authentication. How can I use adapter to communicate with influxdb using certain credentials?

@gangsta

This comment has been minimized.

Copy link
Author

gangsta commented Jun 30, 2018

@weih1214 I`m using influxdburl+credentials as remote storage url, as far as I get, basic_auth works from Prometheus side, but Influxdb is not supporting it , probably thats why you get this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.