feat: add monitoring-stack LXC#1937
Conversation
|
Thanks for the PR, Though those apps are all available as single LXC, I see no real reason to complicate the setup and put all into one LXC. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42be08ac61
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| systemctl enable -q --now prometheus | ||
| systemctl enable -q --now prometheus-alertmanager | ||
| systemctl enable -q --now prometheus-node-exporter | ||
| systemctl enable -q --now loki | ||
| systemctl enable -q --now alloy |
There was a problem hiding this comment.
Restart packaged services after writing managed configs
When apt install starts any of these packaged services during installation, these enable --now calls are no-ops for already-active units, so the Prometheus, Alertmanager, Loki, Alloy, and node_exporter configs written earlier are not loaded until a reboot or manual restart. In that case Prometheus can keep the package default scrape setup and node_exporter can remain on the package default listener instead of the intended 127.0.0.1:${NODE_EXPORTER_PORT}; reload systemd after replacing package units and restart the services here.
Useful? React with 👍 / 👎.
| webhook_configs: | ||
| - url: ${DISCORD_WEBHOOK_URL} |
There was a problem hiding this comment.
Use Alertmanager's Discord receiver for Discord webhooks
When DISCORD_WEBHOOK_URL is supplied at install time, this config sends Alertmanager's generic webhook JSON directly to Discord. Discord incoming webhooks do not accept that payload shape; Alertmanager has a discord_configs receiver for this case, otherwise users who configure the advertised Discord webhook URL will silently lose alert notifications.
Useful? React with 👍 / 👎.
That is fair feedback. The intention was not to replace the existing single-app LXCs, but to offer a ready-to-use monitoring bundle for users who want the stack preconfigured together. I also assumed this could be acceptable since bundled setups are not completely new here, for example with the That said, I understand the concern about complexity and reduced modularity. If this is not a direction the project wants to support for monitoring, I’m fine with dropping the PR. |
|
@Watashi199 Closing stale PR due to inactivity (no commits for 7 days after stale label). |
Scripts which are clearly AI generated and not further revised by the Author of this PR (in terms of Coding Standards and Script Layout) may be closed without review.
✍️ Description
Adds a new
monitoring-stackscript set for ProxmoxVED.This PR introduces:
monitoring-stackupdate_script()flow that backs up managed config, upgrades the installed packages, restores the managed files, and restarts the stackThe container exposes Grafana, Prometheus, and Alertmanager on the CT IP. Loki, Alloy, and node exporter remain local-only inside the container.
🔗 Related PR / Issue
Link: #
✅ Prerequisites (X in brackets)
🏗️ arm64 Support (X in brackets)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.🔍 Code & Security Review (X in brackets)
Code_Audit.md&CONTRIBUTING.mdguidelinesAppName.sh,AppName-install.sh,AppName.json)🤖 AI Assistance (X in brackets)
AGENTS.mdand.github/agents/pve-script-creator.agent.mdas guidance, and the output has been reviewed and corrected to match those guidelines.📋 Additional Information (optional)
Validated with:
bash -n ct/monitoring-stack.sh install/monitoring-stack-install.shjq empty json/monitoring-stack.jsongit diff --check -- ct/headers/monitoring-stack ct/monitoring-stack.sh install/monitoring-stack-install.sh json/monitoring-stack.jsonAlso tested manually with:
Watashi199/codex/monitoring-stack-lxc-v2on a clean Debian 13 unprivileged CTsystemctl is-active grafana-server prometheus prometheus-alertmanager prometheus-node-exporter loki alloycurl -I http://127.0.0.1:3000curl -I http://127.0.0.1:9090/-/readycurl -I http://127.0.0.1:9093/-/readycurl -s http://127.0.0.1:9090/api/v1/targets | jq '.data.activeTargets[] | {job: .labels.job, health: .health}'updateflow validation usingPHS_SILENT=1against the latest branch version/opt/monitoring-stack/.envremains present📦 Application Requirements (for new scripts)
🌐 Source