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

Can I use prometheus to read another prometheus data? #3348

Closed
songjiayang opened this Issue Oct 25, 2017 · 8 comments

Comments

Projects
None yet
4 participants
@songjiayang
Copy link

songjiayang commented Oct 25, 2017

I guess remote_read is the key word, So I do a test, there are my configs

prometheus1: (slave node)

scrape_configs:
  - job_name: 'prometheus1'
    static_configs:
      - targets: ['localhost:9090']

  - job_name: "node"
    static_configs:
      - targets: ["localhost:9100"]

prometheus 2: (master node)

scrape_configs:
  - job_name: 'prometheus2'
    static_configs:
      - targets: ['localhost:9091']

remote_read:
  - url: 'http://localhost:9090/api/v1/read'
    remote_timeout: 8s

I want prometheus2's query can list prometheus1's data, but it not.

My question is that remote_read is the right way and how to config it?

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Oct 25, 2017

Which Prometheus version(s) are you using? Remote read only got implemented Aug 3 in Prometheus 1.8.x and AFAIK does not exist in Prometheus 2.x yet.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Oct 25, 2017

(and with that I mean the remote read server endpoint in Prometheus itself, not Prometheus being able to read remotely as a client, which has been there for a while)

@songjiayang

This comment has been minimized.

Copy link
Author

songjiayang commented Oct 25, 2017

@juliusv thank you, I use Prometheus 1.8.0.

You mean the remote read only can read data from remote storage rather than another Prometheus server ?

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Oct 26, 2017

@songjiayang No, starting with Prometheus 1.8.0, Prometheus itself should also be able to act as a remote read server, meaning that another Prometheus should be able to remotely read from it.

So I am not sure why it does not work for you. Are you just getting the results of the local server, or are you getting a query error? What query are you sending?

@songjiayang

This comment has been minimized.

Copy link
Author

songjiayang commented Oct 26, 2017

@juliusv I run two Prometheus server on my computer, I get data from the local server.

 ./prometheus -version

prometheus, version 1.8.0 (branch: HEAD, revision: 3569eef8b1bc062bb5df43181b938277818f365b)
  build user:       root@bd4857492255
  build date:       20171006-22:16:15
  go version:       go1.9.1
@Wing924

This comment has been minimized.

Copy link

Wing924 commented Oct 28, 2017

Ability to act as a remote read endpoint for other Prometheus
servers.

I also want to know this detail about new feature from 1.8.0 :)

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Nov 12, 2017

Please ask such questions on our mailing list. The issue tracker is only for bug reports and feature requests. See https://prometheus.io/community/ for more information.

@grobie grobie closed this Nov 12, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

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