Skip to content

docker: Update docker config with node_exporter path.#5762

Merged
algorandskiy merged 1 commit intoalgorand:masterfrom
winder:will/docker-metrics
Sep 28, 2023
Merged

docker: Update docker config with node_exporter path.#5762
algorandskiy merged 1 commit intoalgorand:masterfrom
winder:will/docker-metrics

Conversation

@winder
Copy link
Copy Markdown
Contributor

@winder winder commented Sep 27, 2023

Summary

Fixes #5732

The default node exporter path is ./node_exporter. The docker container puts binaries on the path instead of using a fixed location, so this change simply fills in the absolute path.

Test Plan

Using the following config.json:

{
  "EnableMetricReporting": true
}
  1. Control test:
docker run --rm -it \
      -p 9100:9100 \
      -v (pwd)/config.json:/etc/algorand/config.json \
      -e NETWORK=betanet \
      algorand/algod:3.18.0-stable
  1. The metric endpoint does not work:
curl localhost:9100/metrics
  1. Build container with this branch:
docker build \
       -t wwinder/algod:metrics-fix \
       --build-arg CHANNEL=nightly \
       --build-arg TARGETARCH=amd64 --no-cache \
       .
  1. Run the container like above:
docker run --rm -it \
      -p 9100:9100 \
      -v (pwd)/config.json:/etc/algorand/config.json \
      -e NETWORK=betanet \
      wwinder/algod:metrics-fix
  1. The metric endpoint works:
curl localhost:9100/metrics

@winder winder self-assigned this Sep 27, 2023
@winder winder changed the title Update docker config with node_exporter path. docker: Update docker config with node_exporter path. Sep 27, 2023
@winder winder added the Bug-Fix label Sep 27, 2023
@winder winder marked this pull request as ready for review September 27, 2023 20:48
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 27, 2023

Codecov Report

Merging #5762 (e43ca6d) into master (0972548) will increase coverage by 0.85%.
Report is 2 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5762      +/-   ##
==========================================
+ Coverage   54.59%   55.44%   +0.85%     
==========================================
  Files         473      473              
  Lines       66682    66682              
==========================================
+ Hits        36403    36973     +570     
+ Misses      27751    27190     -561     
+ Partials     2528     2519       -9     

see 44 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@algorandskiy algorandskiy merged commit 157f59f into algorand:master Sep 28, 2023
@winder winder deleted the will/docker-metrics branch September 28, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker container does not launch node_exporter by default

3 participants