LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-06-2024, 11:29 AM   #1
LQ496873
Member
 
Registered: Jan 2006
Distribution: openSUSE Leap 15.3
Posts: 120

Rep: Reputation: Disabled
How to scrape prometheus data from a different docker container?


I'm aiming to view in grafana the metrics (recorded in prometheus format) of a containerised cloudflare tunnel. I had it working when prometheus and grafana were installed from my distro repos but not so now they are in a container.


I've got the cloudflare tunnel set up in a docker container and it's recording metrics in prometheus format. I can see it's recording the metrics correctly by going to tunnel_container_ip:tunnel_port/metrics in a browser. So that works.

I've also got prometheus and grafana is two other containers. They display respective guis when I navigate to localhost:9090 and localhost:3000. Those two containers were setup by a docker-compose.yml file and are configured to be in a network together. I assume they can communicate but haven't got so far to check!

But, when I open up localhost:9090 to view prometheus the gui shows up but it doesn't find the data.

I'm wondering what the usual way for a containerised instance of prometheus is to scrape data from the cloudflare container. Do I simply add the cloudflare container the same docker network?, create a shred volume? There's getting it to work, and getting it to work the right way and I've no idea what the right way is!

Thank you!

Last edited by LQ496873; 01-06-2024 at 11:30 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Store Docker Container Data In Docker Volumes LXer Syndicated Linux News 0 03-08-2022 12:45 AM
[SOLVED] Various podman errors from volume mount when running Prometheus Container JockVSJock Linux - Containers 1 07-10-2021 09:40 AM
LXer: Run Prometheus at home in a container LXer Syndicated Linux News 0 07-04-2021 01:25 AM
LXer: Inside the Open Container Project: How Docker plans to unite the container market LXer Syndicated Linux News 0 06-23-2015 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration