mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-16 00:08:14 +01:00
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
This commit is contained in:
parent
053c587bf5
commit
a7dcd975b2
12 changed files with 953 additions and 245 deletions
21
README.md
21
README.md
|
|
@ -14,6 +14,18 @@
|
|||
|
||||
___
|
||||
## :bell: Changelog
|
||||
- **v0.6.0**:
|
||||
- **Grafana & Prometheus Integration:**
|
||||
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
|
||||
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
|
||||
- **Improved Error Handling & Code Refactoring:**
|
||||
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
|
||||
- Standardised container name handling and refined the Quadlet detection logic.
|
||||
- **Self-Update Enhancements:**
|
||||
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
|
||||
- **Miscellaneous Improvements:**
|
||||
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
|
||||
- General code refactoring across the project for better readability and maintainability.
|
||||
- **v0.5.7**: Rewrite of dependency downloads, now jq can be installed with package manager or static binary.
|
||||
- **v0.5.6**: Directly checking for systemd units matching container names.
|
||||
- Improved Quadlet detection by checking for systemd units named after the container.
|
||||
|
|
@ -133,6 +145,15 @@ it-tools -> https://github.com/CorentinTh/it-tools/releases
|
|||
```
|
||||
The `urls.list` file is just an example and I'd gladly see that people contribute back when they add their preferred URLs to their lists.
|
||||
|
||||
## :chart_with_upwards_trend: Prometheus and node_exporter
|
||||
Dockcheck can be used together with [Prometheus](https://github.com/prometheus/prometheus) and [node_exporter](https://github.com/prometheus/node_exporter) to export metrics via the file collector, scheduled with cron or likely.
|
||||
This is done with the `-c` option, like this:
|
||||
```
|
||||
dockcheck.sh -c /path/to/exporter/directory
|
||||
```
|
||||
See the [README_prom.md](./addons/prometheus/README.md) for more detailed information on how to set it up!
|
||||
<sub><sup>Contributed by [tdralle](https://github.com/tdralle).</sup></sub>
|
||||
|
||||
## :bookmark: Labels
|
||||
|
||||
Optionally, you can add labels to your containers to control how Podcheck handles them. Currently, these are the usable labels:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue