Commit b15af207 authored by Navid Sassan's avatar Navid Sassan

Merge branch 'develop' into 'master'

new release

Closes #154

See merge request !15
parents 5016e17f 5f5cf438
......@@ -346,11 +346,12 @@ To allow the check plugins to activate a virtual environment as described in the
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv3'):
activate_this = './monitoring-plugins-venv3/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv3')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV3'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV3') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV3') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -36,7 +37,7 @@ except ImportError as e:
lib.base2.oao('Python module "psutil" is not installed.', STATE_UNKNOWN)
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Reports a quick overview about the host dimensions and installed software.'
......
......@@ -8,22 +8,22 @@
# https://git.linuxfabrik.ch/linuxfabrik-icinga-plugins/checks-linux/-/blob/master/CONTRIBUTING.md
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Checks how well an Apache httpd server is performing.'
......
......@@ -8,15 +8,15 @@
# https://git.linuxfabrik.ch/linuxfabrik-icinga-plugins/checks-linux/-/blob/master/CONTRIBUTING.md
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -35,7 +35,7 @@ import lib.disk2
import lib.url2
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'This plugin lets you track if server updates are available.'
......
......@@ -8,15 +8,15 @@
# https://git.linuxfabrik.ch/linuxfabrik-icinga-plugins/checks-linux/-/blob/master/CONTRIBUTING.md
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -35,7 +35,7 @@ import lib.disk2
import lib.url2
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'This plugin lets you track if server updates are available.'
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -23,7 +24,7 @@ if activate_this and os.path.isfile(activate_this):
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Checks the date and return code of the last borgbackup, according to the logfile.'
......
......@@ -8,22 +8,22 @@
# https://git.linuxfabrik.ch/linuxfabrik-icinga-plugins/checks-linux/-/blob/master/CONTRIBUTING.md
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Warns before an expiration date is scheduled to occur.'
......
......@@ -8,22 +8,22 @@
# https://git.linuxfabrik.ch/linuxfabrik-icinga-plugins/checks-linux/-/blob/master/CONTRIBUTING.md
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Mainly provides utilization percentages for each specific CPU time. Takes a time period into account: the cpu usage within a certain amount of time has to be equal or above given thresholds before a warning is raised.'
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv3'):
activate_this = './monitoring-plugins-venv3/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv3')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV3'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV3') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV3') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -36,7 +37,7 @@ except ImportError as e:
sys.exit(STATE_UNKNOWN)
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Mainly provides utilization percentages for each specific CPU time. Takes a time period into account: the cpu usage within a certain amount of time has to be equal or above given thresholds before a warning is raised.'
......
......@@ -8,22 +8,22 @@
# https://git.linuxfabrik.ch/linuxfabrik-icinga-plugins/checks-linux/-/blob/master/CONTRIBUTING.md
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Checks disk IO.'
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -32,7 +33,7 @@ import lib.args2
import lib.base2
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = '''This check is some kind of user interface for smartctl, which is a tool for
querying and controlling SMART (Self-Monitoring, Analysis, and Reporting Technology) data in
......
......@@ -8,15 +8,15 @@
# https://git.linuxfabrik.ch/linuxfabrik-icinga-plugins/checks-linux/-/blob/master/CONTRIBUTING.md
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -37,7 +37,7 @@ except ImportError as e:
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Checks the used disk space, for each partition.'
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv3'):
activate_this = './monitoring-plugins-venv3/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv3')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV3'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV3') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV3') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -34,7 +35,7 @@ except ImportError as e:
sys.exit(STATE_UNKNOWN)
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021701'
DESCRIPTION = 'Checks the used disk space, for each partition.'
......
......@@ -8,22 +8,22 @@
# https://git.linuxfabrik.ch/linuxfabrik-icinga-plugins/checks-linux/-/blob/master/CONTRIBUTING.md
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Checks dmesg for emerg, alert, crit and err messages. Uses "dmesg --level=emerg,alert,crit,err --reltime". If you fixed the issues (or just want to clear them), use "dmesg --clear" to clear the Kernel Ring Buffer Messages.'
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -23,7 +24,7 @@ if activate_this and os.path.isfile(activate_this):
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Performs a DNS lookup and converts a hostname to one or more IP addresses. Only the name servers configured on the machine running this check plugin (for example those visible in `/etc/resolv.conf`) will be queried - you can\'t query other DNS servers. This command works with both IPv4 and IPv6.'
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -30,7 +31,7 @@ import lib.url2
from lib.globals2 import STATE_UNKNOWN
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'This check just returns the given message, state and perfdata.'
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv3'):
activate_this = './monitoring-plugins-venv3/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv3')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV3'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV3') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV3') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -30,7 +31,7 @@ import lib.url3
from lib.globals3 import STATE_UNKNOWN
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021701'
DESCRIPTION = 'This check just returns the given message, state and perfdata.'
......
......@@ -11,18 +11,19 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021702'
DESCRIPTION = 'Returns information about a specific team or donor at Folding@Home.'
......
......@@ -11,18 +11,19 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021701'
DESCRIPTION = 'In fail2ban, checks the amount of banned IP addresses (for a list of jails).'
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -34,7 +35,7 @@ import lib.icinga2
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021701'
DESCRIPTION = '''Warns on the newest feed item of an RSS or Atom feed. Does not warn any longer
if you acknowledge it in Icingaweb2, and/or if a given amount of time is over.'''
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv2'):
activate_this = './monitoring-plugins-venv2/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv2')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')
if os.getenv('MONITORING_PLUGINS_VENV2'):
activate_this = os.getenv('MONITORING_PLUGINS_VENV2') + '/bin/activate_this.py'
activate_this = os.path.join(os.getenv('MONITORING_PLUGINS_VENV2') + 'bin/activate_this.py')
if activate_this and os.path.isfile(activate_this):
exec(open(activate_this).read(), {'__file__': activate_this})
......@@ -32,7 +33,7 @@ import lib.smb2
from lib.globals2 import STATE_OK, STATE_UNKNOWN
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2021021501'
__version__ = '2021021701'
DESCRIPTION = 'Checks the time of last data modification for a file or directory, in seconds.'
......@@ -83,7 +84,7 @@ def parse_args():
parser.add_argument(
'--pattern',
help="The search string to match against the names of directories or files. This pattern can use '*' as a wildcard for multiple chars and '?' as a wildcard for a single char. Does not support regex patterns. Default: %(default)s.",
help="The search string to match against the names of SMB directories or files. This pattern can use '*' as a wildcard for multiple chars and '?' as a wildcard for a single char. Does not support regex patterns. Default: %(default)s.",
dest='PATTERN',
default=DEFAULT_PATTERN,
)
......
......@@ -11,11 +11,12 @@
import os
activate_this = False
if os.path.exists('./monitoring-plugins-venv3'):
activate_this = './monitoring-plugins-venv3/bin/activate_this.py'
venv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'monitoring-plugins-venv3')
if os.path.exists(venv_path):
activate_this = os.path.join(venv_path, 'bin/activate_this.py')