Skip to content

Commit

Permalink
working on adding grafana dashboards for flink
Browse files Browse the repository at this point in the history
  • Loading branch information
cdpop committed Nov 25, 2024
1 parent a413be1 commit 0754ee6
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 4 deletions.
75 changes: 74 additions & 1 deletion flink/flink_session_mode/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,77 @@ services:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 2
taskmanager.numberOfTaskSlots: 2
${GRAFANA_FLINK}
prometheus:
image: prom/prometheus:v2.29.2
hostname: prometheus
container_name: prometheus
profiles:
- "grafana"
ports:
- 9090:9090
volumes:
- ../../environment/plaintext/prometheus/:/etc/prometheus/

depends_on:
- node-exporter
- kafka-lag-exporter
- alertmanager

grafana:
image: grafana/grafana:8.5.27
hostname: grafana
container_name: grafana
profiles:
- "grafana"
environment:
- "GF_SECURITY_ADMIN_USER=admin"
- "GF_SECURITY_ADMIN_PASSWORD=password"
- "GF_USERS_ALLOW_SIGN_UP=false"
ports:
- 3000:3000
volumes:
- ../../environment/plaintext/grafana/provisioning/:/etc/grafana/provisioning/
- ../../environment/plaintext/grafana/config/grafana.ini:/etc/grafana/grafana.ini
depends_on:
- prometheus

node-exporter:
image: prom/node-exporter:v1.2.2
hostname: node-exporter
container_name: node-exporter
profiles:
- "grafana"
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
- "--collector.filesystem.ignored-mount-points"
- "^(aufs|proc|nsfs|shm|cgroup|tmpfs|binfmt_misc|debugfs|devpts|fusectl|hugetlbfs|fuse.lxcfs|mqueue|pstore|securityfs|sysfs|autofs|devtmpfs|configfs)"

kafka-lag-exporter:
image: seglo/kafka-lag-exporter:0.7.1
hostname: kafka-lag-exporter
container_name: kafka-lag-exporter
profiles:
- "grafana"
restart: always
ports:
- 9998:9998
volumes:
- ../../environment/plaintext/kafka-lag-exporter/application.conf:/opt/docker/conf/application.conf
- ../../environment/plaintext/kafka-lag-exporter/logback.xml:/opt/docker/conf/logback.xml

alertmanager:
image: prom/alertmanager:latest
hostname: alertmanager
container_name: alertmanager
profiles:
- "grafana"
ports:
- 9093:9093
2 changes: 1 addition & 1 deletion flink/flink_session_mode/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ source ${DIR}/../../scripts/utils.sh

source ${DIR}/../../scripts/flink_download_connectors.sh

docker-compose up -d
docker compose --profile grafana up -d
4 changes: 2 additions & 2 deletions flink/flink_session_mode/stop.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
echo "Pops ${DIR}"

source ${DIR}/../../scripts/utils.sh

docker-compose down -v --remove-orphans
docker-compose --profile grafana down -v --remove-orphans

stop_all "$DIR"

0 comments on commit 0754ee6

Please sign in to comment.