Closed kanintesova closed 1 year ago
Like usual, nothing special http://Hostip:port
I must be missing something. Neither Grafana or Prometheus has been assigned IPs in docker :/
Thanks for the quick reply.
And they are not on the host network.
As i don't know the state of your grafana, by default it will be at hostip:3000, but maybe the grafana or prometheus not starting correctly you should check that'
Ok I will need to start it with my user ID. As so:
grafana:
container_name: monitoring-grafana
user: root #or what you got
This solved it!
As for Prometheus had to run as user also: Omit where to look for the config file like so:
prometheus:
#command:
# - '--config.file=/etc/prometheus/prometheus.yml'
# - '--storage.tsdb.path=/prometheus'
container_name: monitoring-prometheus
user: root
Then point it at the mapped volume instead and put config file there:
volumes:
# to be modified depending on your needs
- /path/to/your/prometheus/data:/prometheus
- /path/to/your/prometheus/config:/etc/prometheus/
Then no port showing: Published port in portainer afterwards. Now atleast they connect. Nut not sure what to do next. Will tinker on. Damn haha!
I don't know if I understood everything but for Prometheus to work correctly you have to use the user nobody
and for Grafana the user 472
.
Of course it is necessary to make a chow -R <id> <directory>
of the directories where the data are located.
I don't think the user/permissions are locked down to that specific user. I run both graphana and prometheus with user 1000:1000 without issues Important thing is to create the folders and configs with the same user before starting the container.
As for accessing grafana outside, you can use a reverse proxy on your subdomain. I use caddy v2 with cloudflare plugin, this is my Caddyfile for grafana:
grafana.mydomain.com {
reverse_proxy monitoring-grafana:3000
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
}
This issue was closed because it has been open for 30 days with no activity.
This is probably more of a docker thing. But it would be nice to get a hint how to connect to the GUI from outside localhost. I run a headless server.
How can I connect to the docker internal IPs? I will try to ssh tunnel socks proxy and use firefox to check if it's possible to connect.
Thanks!