prometheus-community / node-exporter-textfile-collector-scripts

Scripts for node-exporter's textfile collector
Apache License 2.0
513 stars 191 forks source link

Add security update metrics for yum.sh #218

Open Britaliope opened 4 months ago

Britaliope commented 4 months ago

Small modification to yum.sh to integrate new gauges that only list security updates.

On older systems, it require yum-plugin-security to work, but on newer systems (el7 and newer IIRC) it is native.

sample output:

# HELP yum_upgrades_pending Yum package pending updates by origin.
# TYPE yum_upgrades_pending gauge
yum_upgrades_pending{origin="appstream",category="all"} 87
yum_upgrades_pending{origin="baseos",category="all"} 192
yum_upgrades_pending{origin="crb",category="all"} 1
yum_upgrades_pending{origin="epel",category="all"} 43
yum_upgrades_pending{origin="extras",category="all"} 1
yum_upgrades_pending{origin="appstream",category="security"} 22
yum_upgrades_pending{origin="baseos",category="security"} 42