Skip to main content

Zypper Patch Status Collector

This queries the current patch status of the system from Zypper and exports it in a format compatible with the Prometheus Node Exporter's textfile collector.

Usage

# HELP zypper_applicable_patches The current count of applicable patches
# TYPE zypper_applicable_patches gauge
zypper_applicable_patches{category="security",severity="critical"} 0
zypper_applicable_patches{category="security",severity="important"} 2
zypper_applicable_patches{category="security",severity="moderate"} 0
zypper_applicable_patches{category="security",severity="low"} 0
zypper_applicable_patches{category="security",severity="unspecified"} 0
zypper_applicable_patches{category="recommended",severity="critical"} 0
zypper_applicable_patches{category="recommended",severity="important"} 0
zypper_applicable_patches{category="recommended",severity="moderate"} 0
zypper_applicable_patches{category="recommended",severity="low"} 0
zypper_applicable_patches{category="recommended",severity="unspecified"} 0
zypper_applicable_patches{category="optional",severity="critical"} 0
zypper_applicable_patches{category="optional",severity="important"} 0
zypper_applicable_patches{category="optional",severity="moderate"} 0
zypper_applicable_patches{category="optional",severity="low"} 0
zypper_applicable_patches{category="optional",severity="unspecified"} 0
zypper_applicable_patches{category="feature",severity="critical"} 0
zypper_applicable_patches{category="feature",severity="important"} 0
zypper_applicable_patches{category="feature",severity="moderate"} 0
zypper_applicable_patches{category="feature",severity="low"} 0
zypper_applicable_patches{category="feature",severity="unspecified"} 0
zypper_applicable_patches{category="document",severity="critical"} 0
zypper_applicable_patches{category="document",severity="important"} 0
zypper_applicable_patches{category="document",severity="moderate"} 0
zypper_applicable_patches{category="document",severity="low"} 0
zypper_applicable_patches{category="document",severity="unspecified"} 0
zypper_applicable_patches{category="yast",severity="critical"} 0
zypper_applicable_patches{category="yast",severity="important"} 0
zypper_applicable_patches{category="yast",severity="moderate"} 0
zypper_applicable_patches{category="yast",severity="low"} 0
zypper_applicable_patches{category="yast",severity="unspecified"} 0
# HELP zypper_service_needs_restart Set to 1 if service requires a restart due to using no-longer-existing libraries.
# TYPE zypper_service_needs_restart gauge
zypper_service_needs_restart{service="nscd"} 1
zypper_service_needs_restart{service="dbus"} 1
zypper_service_needs_restart{service="cups"} 1
zypper_service_needs_restart{service="sshd"} 1
zypper_service_needs_restart{service="cron"} 1
# HELP zypper_product_end_of_life Unix timestamp on when support for the product will end.
# TYPE zypper_product_end_of_life gauge
zypper_product_end_of_life{product="openSUSE"} 1606694400
zypper_product_end_of_life{product="openSUSE_Addon_NonOss"} 1000000000000001
# HELP zypper_needs_rebooting Whether the system requires a reboot as core libraries or services have been updated.
# TYPE zypper_needs_rebooting gauge
zypper_needs_rebooting 0
# HELP zypper_scrape_success Whether the last scrape for zypper data was successful.
# TYPE zypper_scrape_success gauge
zypper_scrape_success 1

To get this picked up by the Prometheus Node Exporter's textfile collector dump the output into a zypper.prom file in the textfile collector directory. You can utilise the --output-file parameter to have the exporter write directly to that file:

> zypper-patch-status-collector --output-file /var/lib/node_exporter/collector/zypper.prom

Installation

Install with uv:

uv tool install zypper-patch-status-collector

On openSUSE, you can also install the python313-zypper-patch-status-collector package from the home:theMarix:Monitoring repository:

sudo zypper addrepo https://download.opensuse.org/repositories/home:theMarix:Monitoring/<SUSE VERSION>/home:theMarix:Monitoring.repo
sudo zypper install python313-zypper-patch-status-collector

It also requires the reboot advisory and the lifecycle plug-in for zypper to be installed:

zypper install zypper-needs-restarting zypper-lifecycle-plugin

When installing from the openSUSE package, these are automatically pulled in as a dependency.

Contributing

Contributions should be submitted as pull requests to the Codeberg repository. Please run the tests and pre-commit hooks before submitting; see CONTRIBUTING.md for details.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You can find a full version of the license in the LICENSE file. If not, see https://www.gnu.org/licenses/.

Metadata

Release files for zypper-patch-status-collector 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zypper-patch-status-collector 1.0.0
File Size Uploaded Provenance Actions
zypper_patch_status_collector-1.0.0.tar.gz 23.5 kB Without provenance Details for zypper_patch_status_collector-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zypper-patch-status-collector 1.0.0
File Interpreter ABI Platform Actions
zypper_patch_status_collector-1.0.0-py3-none-any.whl Python 3 none any Details for zypper_patch_status_collector-1.0.0-py3-none-any.whl

Total release size: 43.7 kB

Release files / zypper_patch_status_collector-1.0.0.tar.gz

Download URL zypper_patch_status_collector-1.0.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4384ad772e811f3bb99235c50b30ff87a7b36b89d9e9a68e42ca4cf3636a41e6
BLAKE2b-256 checksum
How to use checksums
57ebdde66b3ce5da63f88fd59e61b37d7c8d3b5bd2b868ff9e2e21762a27ef1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.16

Release files / zypper_patch_status_collector-1.0.0-py3-none-any.whl

Download URL zypper_patch_status_collector-1.0.0-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
983da56126003be0fc938b30b8a327d670a5da97704ed76ae485a48ee6b2a408
BLAKE2b-256 checksum
How to use checksums
457f82f9d5298929a211166aa104d4c98ebeee228a66a1c2b03f965845fee320
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.16

Security for zypper-patch-status-collector 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page