-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
metrics: make it possible to spin up Grafana using docker-compose #2383
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: 1 | ||
|
||
providers: | ||
- name: "libp2p dashboard provider" | ||
orgId: 1 | ||
type: file | ||
disableDeletion: false | ||
updateIntervalSeconds: 10 | ||
allowUiUpdates: false | ||
options: | ||
path: /var/lib/grafana/dashboards | ||
foldersFromFilesStructure: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: 1 | ||
|
||
deleteDatasources: | ||
- name: Prometheus | ||
orgId: 1 | ||
|
||
datasources: | ||
- name: Prometheus | ||
orgId: 1 | ||
type: prometheus | ||
access: proxy | ||
url: http://host.docker.internal:9090 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be |
||
editable: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: "3.7" | ||
services: | ||
prometheus: | ||
image: prom/prometheus:latest | ||
ports: | ||
- "9090:9090" | ||
volumes: | ||
- ./prometheus.yml:/etc/prometheus/prometheus.yml | ||
grafana: | ||
image: grafana/grafana:latest | ||
depends_on: | ||
- prometheus | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- GF_AUTH_DISABLE_LOGIN_FORM=true | ||
- GF_AUTH_ANONYMOUS_ENABLED=true | ||
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin | ||
volumes: | ||
- ./dashboard.yml:/etc/grafana/provisioning/dashboards/main.yml | ||
- ./datasources.yml:/etc/grafana/provisioning/datasources/prom.yml | ||
- ./autonat/autonat.json:/var/lib/grafana/dashboards/autonat.json | ||
- ./autorelay/autorelay.json:/var/lib/grafana/dashboards/autorelay.json | ||
- ./eventbus/eventbus.json:/var/lib/grafana/dashboards/eventbus.json | ||
- ./identify/identify.json:/var/lib/grafana/dashboards/identify.json | ||
- ./relaysvc/relaysvc.json:/var/lib/grafana/dashboards/relaysvc.json | ||
- ./swarm/swarm.json:/var/lib/grafana/dashboards/swarm.json | ||
marten-seemann marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
global: | ||
scrape_interval: 15s | ||
scrape_timeout: 10s | ||
evaluation_interval: 15s | ||
alerting: | ||
alertmanagers: | ||
- scheme: http | ||
timeout: 10s | ||
api_version: v1 | ||
static_configs: | ||
- targets: [] | ||
scrape_configs: | ||
- job_name: prometheus | ||
honor_timestamps: true | ||
scrape_interval: 15s | ||
scrape_timeout: 10s | ||
metrics_path: /metrics | ||
scheme: http | ||
static_configs: | ||
- targets: | ||
- localhost:9090 | ||
- job_name: libp2p | ||
honor_timestamps: true | ||
scrape_interval: 15s | ||
scrape_timeout: 10s | ||
metrics_path: /debug/metrics/prometheus | ||
scheme: http | ||
static_configs: | ||
- targets: | ||
- host.docker.internal:5001 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only works on macos. This will fail on linux There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How would this work on Linux? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's no easy way unfortunately. You can use https://github.com/qoomon/docker-host but that requires binding the host thing to 0.0.0.0 (or at least the bridge interface). You can do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened #2387. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn’t know you could do this. Cool!