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

POC dashboard in Grafana #65

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions grafana/config/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.

# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: "xk6-dashboard"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"

# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s

static_configs:
- targets: ["localhost:9090"]
3 changes: 3 additions & 0 deletions grafana/config/prometheus/prometheus.yml.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2023 Raintank, Inc. dba Grafana Labs

SPDX-License-Identifier: AGPL-3.0-only
48 changes: 48 additions & 0 deletions grafana/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: "3.8"
networks:
k6:
grafana:
prometheus:

services:
prometheus:
image: prom/prometheus:v2.45.0
command:
- --web.enable-remote-write-receiver
- --enable-feature=native-histograms
- --config.file=/etc/prometheus/prometheus.yml
networks:
- k6
- grafana
- prometheus
ports:
- "9090:9090"

grafana:
image: grafana/grafana:10.0.1
networks:
- grafana
- prometheus
ports:
- "3000:3000"
# environment:
# - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
# - GF_AUTH_ANONYMOUS_ENABLED=true
# - GF_AUTH_BASIC_ENABLED=false
volumes:
- ./grafana:/etc/grafana/provisioning/

# k6:
# build: .
# networks:
# - k6
# ports:
# - "6565:6565"
# environment:
# - K6_PROMETHEUS_RW_SERVER_URL=http://prometheus:9090/api/v1/write
# - K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true
# - K6_OUT=xk6-prometheus-rw
# depends_on:
# - prometheus
# volumes:
# - ./samples:/scripts
3 changes: 3 additions & 0 deletions grafana/docker-compose.yml.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2023 Raintank, Inc. dba Grafana Labs

SPDX-License-Identifier: AGPL-3.0-only
Loading
Loading