Can Prometheus find the remote storage adapter via 'Service Discovery' ?

69 views
Skip to first unread message

zha...@luminatewireless.com

unread,
Jun 5, 2017, 11:23:02 PM6/5/17
to Prometheus Developers
Dear Sir/Madam,

I have been using Prometheus for past 2 months and want to use OpenTSDB as remote storage. The diagram looks like below:

------------------- -------------------- ----------
|Prometheus-server|<--->|Read/Write Adapter|<--->|OpenTSDB|
------------------- -------------------- ----------

Since all the services are deployed on the cluster, so they have dynamic IP addresses which are stored in the zookeeper. I already have the mechanism to get the real-time IP address so Read/Write Adapter can find the OpenTSDB.

My question is what the title says: can Prometheus find the Read/Write Adapter via 'Service Discovery'?

Thanks in advance.

Regards,
Qi

Ben Kochie

unread,
Jun 6, 2017, 3:19:18 AM6/6/17
to zha...@luminatewireless.com, Prometheus Developers
You would need to have a DNS address that is updated by zookeeper.  What cluster software are you using?


--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/6ac7df49-d095-4075-a914-95b83bf73444%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Qi Zhang

unread,
Jun 6, 2017, 4:06:31 AM6/6/17
to Ben Kochie, Prometheus Developers
Thanks for reply, Ben

I use Aurora + Mesos to build the cluster. I want to run the Adapter as a job scheduled by Aurora.

The DNS address can help Prometheus find the IP of the Adapter. But the port is also dynamic. Actually, the hostname is also dynamic which looks like <machine>.xxx.com. It depends on which machine is chosen to run the Adapter.
Now I put the hostname and port value in the zookeeper node and that is updated by Aurora. The content of the node looks like:
{
  "endpoint": "machine4.blablia.com",
  "port_map": {
    "_adapter_http_port": 12306
  }
}
The zookeeper node path is something like '/aurora/jobs/prometheus/remote_storage/adapter'.
I also have the code that used to watch the path and get the latest hostname and port.

So if there is some mechanism like 'file_sd_config', I can use my own code to update the config file.

Thanks,
Qi



On Tue, Jun 6, 2017 at 3:19 PM, Ben Kochie <sup...@gmail.com> wrote:
You would need to have a DNS address that is updated by zookeeper.  What cluster software are you using?
On Tue, Jun 6, 2017 at 5:23 AM, <zha...@luminatewireless.com> wrote:
Dear Sir/Madam,

I have been using Prometheus for past 2 months and want to use OpenTSDB as remote storage. The diagram looks like below:

-------------------     --------------------     ----------
|Prometheus-server|<--->|Read/Write Adapter|<--->|OpenTSDB|
-------------------     --------------------     ----------

Since all the services are deployed on the cluster, so they have dynamic IP addresses which are stored in the zookeeper. I already have the mechanism to get the real-time IP address so Read/Write Adapter can find the OpenTSDB.

My question is what the title says: can Prometheus find the Read/Write Adapter via 'Service Discovery'?

Thanks in advance.

Regards,
Qi

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.

Ben Kochie

unread,
Jun 6, 2017, 4:23:26 AM6/6/17
to Qi Zhang, Prometheus Developers
Maybe you need something like https://github.com/tellapart/aurproxy

Qi Zhang

unread,
Jun 6, 2017, 4:28:29 AM6/6/17
to Ben Kochie, Prometheus Developers
Thanks, I will check this.
Reply all
Reply to author
Forward
0 new messages