perun.proxy.utils 3.0.0__tar.gz → 3.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/PKG-INFO +1 -1
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/run_probes.py +21 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/separate_oidc_logs.py +4 -3
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/separate_ssp_logs.py +4 -3
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/PKG-INFO +1 -1
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/setup.cfg +1 -1
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/LICENSE +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/README.md +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/__init__.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/metadata_expiration.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/__init__.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_custom_command.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_dockers.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_exabgp_propagation.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_ldap.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_ldap_syncrepl.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_mongodb.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_nginx.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_oidc_login.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_pgsql.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_php_syntax.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_privacyidea.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_rpc_status.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_saml.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_user_logins.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/webserver_availability.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/oracle2postgresql.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/print_docker_versions.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/run_version_script.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/sync_usable_token_types.py +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/SOURCES.txt +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/dependency_links.txt +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/entry_points.txt +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/requires.txt +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/top_level.txt +0 -0
- {perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/setup.py +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/python3
|
|
2
|
+
import argparse
|
|
2
3
|
import re
|
|
3
4
|
import subprocess
|
|
4
5
|
import sys
|
|
@@ -73,9 +74,27 @@ def run_probe(probe_name, command, timeout):
|
|
|
73
74
|
return result.returncode
|
|
74
75
|
|
|
75
76
|
|
|
77
|
+
def parse_arguments():
|
|
78
|
+
parser = argparse.ArgumentParser()
|
|
79
|
+
parser.add_argument(
|
|
80
|
+
"-p",
|
|
81
|
+
"--probes",
|
|
82
|
+
nargs="+",
|
|
83
|
+
default=[],
|
|
84
|
+
help="Optional list of probes to run from the config."
|
|
85
|
+
"If not specified, all probes will be run.",
|
|
86
|
+
)
|
|
87
|
+
args = parser.parse_args()
|
|
88
|
+
return args
|
|
89
|
+
|
|
90
|
+
|
|
76
91
|
def main():
|
|
92
|
+
args = parse_arguments()
|
|
93
|
+
probes_to_run = args.probes
|
|
94
|
+
|
|
77
95
|
config_filepath = "/etc/run_probes_cfg.yaml"
|
|
78
96
|
config = yaml.safe_load(open_file(config_filepath))
|
|
97
|
+
|
|
79
98
|
if not config:
|
|
80
99
|
return
|
|
81
100
|
|
|
@@ -83,6 +102,8 @@ def main():
|
|
|
83
102
|
for _, options in config["checks"].items():
|
|
84
103
|
module = options["module"]
|
|
85
104
|
for name, args in options.get("runs").items():
|
|
105
|
+
if probes_to_run and name not in probes_to_run:
|
|
106
|
+
continue
|
|
86
107
|
command = ["python3", "-m", module]
|
|
87
108
|
timeout = global_timeout
|
|
88
109
|
if args is not None:
|
|
@@ -69,9 +69,10 @@ def main():
|
|
|
69
69
|
final_log_file.close()
|
|
70
70
|
|
|
71
71
|
# Zip old log file
|
|
72
|
-
with
|
|
73
|
-
full_log_absolute_name
|
|
74
|
-
|
|
72
|
+
with (
|
|
73
|
+
open(full_log_absolute_name, "rb") as f_in,
|
|
74
|
+
gzip.open(full_log_absolute_name + ".gz", "wb") as f_out,
|
|
75
|
+
):
|
|
75
76
|
shutil.copyfileobj(f_in, f_out)
|
|
76
77
|
|
|
77
78
|
# Remove unzip file
|
|
@@ -79,9 +79,10 @@ def main():
|
|
|
79
79
|
final_log_file.close()
|
|
80
80
|
|
|
81
81
|
# Zip old log file
|
|
82
|
-
with
|
|
83
|
-
full_log_absolute_name
|
|
84
|
-
|
|
82
|
+
with (
|
|
83
|
+
open(full_log_absolute_name, "rb") as f_in,
|
|
84
|
+
gzip.open(full_log_absolute_name + ".gz", "wb") as f_out,
|
|
85
|
+
):
|
|
85
86
|
shutil.copyfileobj(f_in, f_out)
|
|
86
87
|
|
|
87
88
|
# Remove unzip file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/metadata_expiration.py
RENAMED
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_custom_command.py
RENAMED
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_dockers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_ldap_syncrepl.py
RENAMED
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_mongodb.py
RENAMED
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_oidc_login.py
RENAMED
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_php_syntax.py
RENAMED
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_privacyidea.py
RENAMED
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_rpc_status.py
RENAMED
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/nagios/check_user_logins.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/print_docker_versions.py
RENAMED
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun/proxy/utils/sync_usable_token_types.py
RENAMED
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{perun.proxy.utils-3.0.0 → perun.proxy.utils-3.1.0}/perun.proxy.utils.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|