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

No Prometheus nor Grafana Plots - /examples/flower-via-docker-compose #3219

Open
WilliamLindskog opened this issue Apr 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@WilliamLindskog
Copy link
Contributor

Describe the bug

Hi there,

I'm cloning the /examples/flower-via-docker-compose, following the installation steps for Docker on Ubuntu 22.04 and there after running the required commands:

cd flower-via-docker-compose/

python helpers/generate_docker_compose.py

sudo docker-compose build

sudo docker-compose up

and everything seems to start, I can tell by the results in the CLI and by monitoring docker using docker stats.

However, when opening up Grafana on http://localhost:3000, I see following error while hovering above a warning sign: Post "http://host.docker.internal:9090/api/v1/query_range" dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host
Screenshot from 2024-04-04 13-59-04

According to the documentation, I should not configure anything but it seems that the configuration is somehow wrong. Does anyone know how I can fix this? Maybe someone else has the same problem.

Best regards,
William

Steps/Code to Reproduce

Running on Ubuntu 22.04:

# uninstall all conflicting packages
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# go to work environment 
cd <WORK ENVIRONMENT> # fill in 

# clone repository
git clone --depth=1 https://github.com/adap/flower.git && mv flower/examples/flower-via-docker-compose . && rm -rf flower && cd flower-via-docker-compose


# Generate docker compose file
python helpers/generate_docker_compose.py # by default will configure to use 2 clients for 100 rounds

# Build docker images
docker-compose build

# Launch everything
docker-compose up

# then open up http://localhost:3000

Expected Results

There should be results as the ones shown in /examples/flower-via-docker-compose:

image

Actual Results

Screenshot from 2024-04-04 13-59-04

@WilliamLindskog WilliamLindskog added the bug Something isn't working label Apr 4, 2024
@WilliamLindskog
Copy link
Contributor Author

Just got a response in Slack:
"Try changing url: http://host.docker.internal:9090 in prometheus-datasource.yml to url: http://prometheus:9090

That did the trick! Hope this helps someone.

@jafermarq
Copy link
Contributor

Just got a response in Slack: "Try changing url: http://host.docker.internal:9090 in prometheus-datasource.yml to url: http://prometheus:9090

That did the trick! Hope this helps someone.

Do you want to open a small PR and edit the README.md to indicate this ?

@WilliamLindskog
Copy link
Contributor Author

Hi @jafermarq,

Can do that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants