From da318db5ec1eca87f5f56bcce348de93ac26129a Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Thu, 9 Nov 2017 12:29:07 +0100 Subject: [PATCH] check_xbps.py: Hint to use "--sudo" --- check_xbps.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check_xbps.py b/check_xbps.py index c408afc..c4c8906 100755 --- a/check_xbps.py +++ b/check_xbps.py @@ -2,7 +2,7 @@ # -*- encoding: utf-8 -*- ##################################################################### -# (c) 2016 by Sven Velt, Germany # +# (c) 2016-2017 by Sven Velt, Germany # # sven-mymonplugins@velt.biz # # # # This file is part of "velt.biz - My Monitoring Plugins" # @@ -117,6 +117,8 @@ if plugin.options.sync_repo_index: serr and plugin.verbose(3, serr, prefix='stderr: ') plugin.verbose(2, 'Return code: %d' % rc) if plugin.options.fail_on_sync_failure and (rc != 0 or 'ERROR:' in ' '.join(serr)): + if 'Permission denied' in ' '.join(serr): + plugin.back2nagios(plugin.RETURNCODE['CRITICAL'], 'Syncing of repository index files failed, permission denied. Do you need "--sudo"?', multiline=serr) plugin.back2nagios(plugin.RETURNCODE['CRITICAL'], 'Syncing of repository index files failed', multiline=serr) ##############################################################################