Skip to content

Commit fb9cc35

Browse files
committed
fix(deb-updates): missing rights and still OK (closes #937)
1 parent 51039b4 commit fb9cc35

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Build, CI/CD:
3030
Monitoring Plugins:
3131

3232
* deb-updates: apt-get returns with an error ([#904](https://github.com/Linuxfabrik/monitoring-plugins/issues/904))
33+
* deb-updates: missing rights and still OK ([#937](https://github.com/Linuxfabrik/monitoring-plugins/issues/937))
3334
* icinga-topflap-services: prevent stacktrace when required parameters are empty
3435
* openstack-swift-stat: problem with python-keystoneclient, optimize requirements* ([#900](https://github.com/Linuxfabrik/lib/issues/900))
3536
* safenet-hsm-state: set `use_agent` to false and enable perfdata in Icinga Director Basket

check-plugins/deb-updates/deb-updates

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ from lib.globals import (STATE_OK, STATE_UNKNOWN) # pylint: disable=C0413
2424

2525

2626
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
27-
__version__ = '2025052301'
27+
__version__ = '2025090401'
2828

2929
DESCRIPTION = '''This plugin checks for software updates on systems that use
3030
package management systems based on the apt-get(8) command
@@ -120,13 +120,15 @@ def main():
120120
lib.shell.shell_exec('sudo apt-get update --quiet 2', timeout=args.TIMEOUT),
121121
)
122122
if retc or stderr:
123-
msg += '`apt-get update` returned with an error, maybe results are not accurate. '
124-
# but go on...
123+
# Not printing stderr as it is quite verbose
124+
msg += '`apt-get update` returned with an error. '
125+
lib.base.cu(msg)
125126

126127
stdout, _, retc = lib.base.coe(
127128
lib.shell.shell_exec('apt list --upgradable', timeout=args.TIMEOUT),
128129
)
129130
if retc:
131+
# Not printing stderr as it is quite verbose
130132
msg += '`apt list --upgradable` returned with an error. '
131133
lib.base.cu(msg)
132134

0 commit comments

Comments
 (0)