Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Update prometheus Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Rados13 committed Aug 29, 2023
1 parent 55743d4 commit b0b4f7d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 27 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test_build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
SECRET_KEY_BASE=${{secrets.SECRET_KEYBASE}}
JELLYFISH_ADDRESS=${{env.JELLYFISH_ADDRESS}}
JELLYFISH_ADDRESSES=${{secrets.SANDBOX_HOST}}:5002 ${{secrets.SANDBOX2_HOST}}:4000
PROMETHEUS_TARGETS=${{secrets.SANDBOX_HOST}}:9568,${{secrets.SANDBOX2_HOST}}:9568
BACKEND_ADDRESS=${{env.BACKEND_ADDRESS}}
BEAM_PORT=9000
GF_SECURITY_ADMIN_PASSWORD=${{secrets.GF_SECURITY_ADMIN_PASSWORD}}
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ services:
build:
context: ./prometheus
dockerfile: Dockerfile
args:
JELLYFISH2_IP: $JELLYFISH2_IP
environment:
TARGETS: ${PROMETHEUS_TARGETS:-jellyfish1:9568 jellyfish2:9568}
container_name: prometheus
restart: on-failure
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
# - '--enable-feature=expand-external-labels'
- '--enable-feature=expand-external-labels'
volumes:
- prometheus_data:/prometheus
depends_on:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose-distributed-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,16 @@ services:
build:
context: ./prometheus
dockerfile: Dockerfile
environment:
TARGETS: ${PROMETHEUS_TARGETS:-jellyfish1:9568 jellyfish2:9568}
container_name: prometheus
restart: on-failure
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--enable-feature=expand-external-labels'
volumes:
- prometheus_data:/prometheus
depends_on:
Expand Down
17 changes: 3 additions & 14 deletions docker-compose-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@ services:
- "49999:49999"
- "50000-50500:50000-50500/udp"

jellyfish2:
<<: *jellyfish-template
container_name: jellyfish2
environment:
<<: *jellyfish-environment
INTEGRATED_TURN_PORT_RANGE: "50501-51000"
INTEGRATED_TCP_TURN_PORT: "499998"
PORT: 5003
ports:
- "5003:5003"
- "49998:49998"
- "50501-51000:50501-51000/udp"

frontend:
build:
context: ./assets
Expand Down Expand Up @@ -87,18 +74,20 @@ services:
build:
context: ./prometheus
dockerfile: Dockerfile
environment:
TARGETS: ${PROMETHEUS_TARGETS:-jellyfish1:9568 jellyfish2:9568}
container_name: prometheus
restart: on-failure
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--enable-feature=expand-external-labels'
volumes:
- prometheus_data:/prometheus
depends_on:
- jellyfish1
- jellyfish2

grafana:
build:
Expand Down
10 changes: 2 additions & 8 deletions prometheus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
FROM prom/prometheus:v2.22.0
FROM prom/prometheus:v2.27.0

LABEL version="1.0.0"

RUN echo " - job_name: 'jellyfish2'" >> ./prometheus.yaml
RUN echo " static_configs:" >> ./prometheus.yaml
RUN echo " - targets: ['$JELLYFISH2_IP:9568']" >> ./prometheus.yaml

COPY ./prometheus.yaml /etc/prometheus/prometheus.yml

COPY ./prometheus.yaml /etc/prometheus/prometheus.yml
4 changes: 2 additions & 2 deletions prometheus/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ global:
monitor: 'codelab-monitor'

scrape_configs:
- job_name: 'jellyfish1'
- job_name: 'jellyfishes'
static_configs:
- targets: ['jellyfish1:9568']
- targets: [${TARGETS}]

0 comments on commit b0b4f7d

Please sign in to comment.