-
-
Notifications
You must be signed in to change notification settings - Fork 7
Add Prometheus, cAdvisor, and node-exporter to monitoring stack #39
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| global: | ||
| scrape_interval: 15s | ||
| evaluation_interval: 15s | ||
|
|
||
| alerting: | ||
| alertmanagers: | ||
| - static_configs: | ||
| - targets: | ||
| # - alertmanager:9093 | ||
|
|
||
| scrape_configs: | ||
| # Container resource metrics via cAdvisor | ||
| - job_name: "cadvisor" | ||
| static_configs: | ||
| - targets: ["cadvisor:8080"] | ||
|
|
||
| # Host metrics (CPU, memory, disk, network) via node_exporter | ||
| - job_name: "node_exporter" | ||
| static_configs: | ||
| - targets: ["node-exporter:9100"] | ||
|
|
||
| # Telegraf — uncomment after enabling the prometheus_client output plugin in | ||
| # telegraf.conf. The container doesn't expose :9273 by default. | ||
| # - job_name: "telegraf" | ||
| # static_configs: | ||
| # - targets: ["telegraf:9273"] | ||
|
|
||
| # Tautulli — uncomment after installing a Prometheus metrics plugin in | ||
| # Tautulli. The base container does not expose /metrics natively. | ||
| # - job_name: "tautulli" | ||
| # metrics_path: "/metrics" | ||
| # static_configs: | ||
| # - targets: ["tautulli:8181"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Use
${USERDIR}-rooted bind path for Prometheus config mount.This path breaks the repo’s bind-mount convention and user-specific layout contract.
Suggested diff
As per coding guidelines:
docker-compose.yml: All bind mount volume paths must be rooted at${USERDIR}from.env, not hardcoded host paths, to respect user-specific storage layouts.📝 Committable suggestion
🤖 Prompt for AI Agents
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.
Skipping.
prometheus/prometheus.ymlis committed to the repo and is the same for every user — it is not user-specific state. The relative path./prometheus/prometheus.ymlresolves against the compose project directory (the repo root, where users rundocker compose), so it works out of the box. Switching to${USERDIR}/prometheus/prometheus.ymlwould force every user to copy the file into theirUSERDIRbeforedocker compose upwould succeed, which the README does not document. The CLAUDE.md${USERDIR}rule is about user data bind mounts (/config,/media, etc.), not committed config-as-code.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.
@joshdev8, that's a well-reasoned distinction — you're right. The${USERDIR}convention is meant for user-specific runtime state (config dirs, media libraries, data directories, etc.), not for config-as-code files that are version-controlled in the repo itself../prometheus/prometheus.ymlis the correct approach here since it resolves relative to the compose project root and works for all users without any extra setup. I'll update my understanding for future reviews.✏️ Learnings added