Change Detection¶
Change Detection is used to monitor websites and send notifications for when the websites have changed. I typically use this to be notified of when a new release of an OS image is released.
Installation¶
Default Port: 5000
Config¶
Test
apprise -vv -t 'my title' -b 'my notification body' 'mailto://user:[email protected]'
Notification URL List
mailto://user:[email protected]
Traefik¶
homelab/pve/traefik/conf.d/changedetection.yaml
---
http:
#region routers
routers:
changedetection:
entryPoints:
- "websecure"
rule: "Host(`cd.l.nicholaswilde.io`)"
middlewares:
- default-headers@file
- https-redirectscheme@file
tls: {}
service: changedetection
#endregion
#region services
services:
changedetection:
loadBalancer:
servers:
- url: "http://192.168.1.72:5000"
passHostHeader: true
#endregion
Usage¶
Monitoring Gitea Releases¶
To monitor Gitea releases for a repository, use the RSS feed URL format:
Monitoring GitHub Commits¶
For repositories that do not use releases, you can monitor commits using the Atom feed URL:
Upgrade¶
Notifications¶
Automated LXC Updates¶
I use ChangeDetection to monitor for new Debian standard releases and automatically trigger a Proxmox LXC template rebuild.
SSH Key Configuration¶
The automation requires passwordless SSH access from the ChangeDetection LXC to the Proxmox nodes.
Webhook Setup¶
The webhook tool listens for HTTP requests from ChangeDetection and executes the trigger script.
Hooks Configuration (pve/changedetection/hooks.json)
[
{
"id": "rebuild-amd64",
"execute-command": "/root/git/nicholaswilde/homelab/pve/changedetection/trigger-lxc-update.sh",
"command-working-directory": "/root/git/nicholaswilde/homelab/pve/changedetection",
"pass-arguments-to-command": [
{ "source": "string", "name": "--host" },
{ "source": "string", "name": "192.168.1.141" }
]
},
{
"id": "rebuild-arm64",
"execute-command": "/root/git/nicholaswilde/homelab/pve/changedetection/trigger-lxc-update.sh",
"command-working-directory": "/root/git/nicholaswilde/homelab/pve/changedetection",
"pass-arguments-to-command": [
{ "source": "string", "name": "--host" },
{ "source": "string", "name": "192.168.1.66" }
]
}
]
Systemd Service (pve/changedetection/webhook-pve.service)
[Unit]
Description=Webhook Listener for PVE LXC Automation
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root/git/nicholaswilde/homelab/pve/changedetection
ExecStart=/usr/bin/webhook -hooks /root/git/nicholaswilde/homelab/pve/changedetection/hooks.json -verbose -port 9000
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Enable Service
For general installation and service setup, see the Webhook Tool Documentation.
Trigger Script¶
The trigger-lxc-update.sh script orchestrates the remote execution of the rebuild process on the specified Proxmox host.
Location: pve/changedetection/trigger-lxc-update.sh
ChangeDetection.io Setup¶
To trigger the rebuild when a change is detected:
- Edit the watch item for the Debian standard release.
- Go to the Notifications tab.
- Add the following URL to the Notification URL List:
Task List¶
task: Available tasks for this project:
* backup: Backup ChangeDetection
* clean: Clean node_modules
* decrypt: Decrypt scan.db using SOPS
* deps: Install dependencies
* encrypt: Encrypt scan.db using SOPS
* export: Export the task list
* init: Init app
* mklinks: Make symlinks
* restart: Restart ChangeDetection service
* start: Start ChangeDetection service
* stop: Stop changedetection service
* update: Update ChangeDetection
* upgrade: Upgrade ChangeDetection
References¶
- https://github.com/caronc/apprise
- https://pimox-scripts.com/scripts?id=Change+Detection
- https://community-scripts.github.io/ProxmoxVE/scripts?id=changedetection