Skip to content
Snippets Groups Projects
Commit c0cfd0aa authored by nimrod's avatar nimrod
Browse files

Clearer verbose output.

parent 828d2fa6
No related branches found
No related tags found
No related merge requests found
Pipeline #1999 passed
...@@ -145,7 +145,7 @@ class Check: ...@@ -145,7 +145,7 @@ class Check:
_cmd = [ _cmd = [
self.Command, self.Command,
] + self.Arguments ] + self.Arguments
logging.info(f"Running command {_cmd}.") logging.info(f"Running command {_cmd}")
try: try:
proc = subprocess.run( # nosec proc = subprocess.run( # nosec
[ [
...@@ -165,13 +165,13 @@ class Check: ...@@ -165,13 +165,13 @@ class Check:
self.ExitCode = proc.returncode self.ExitCode = proc.returncode
logging.info(f"Exit code is {self.ExitCode}.") logging.info(f"Exit code is {self.ExitCode}.")
self._stdout = proc.stdout self._stdout = proc.stdout
logging.info(f"stdout is {self._stdout}.") logging.info(f"stdout is {self._stdout}")
self.stderr = proc.stderr self.stderr = proc.stderr
logging.info(f"stderr is {self.stderr}.") logging.info(f"stderr is {self.stderr}")
if self.ExitCode in list(NagiosCode): if self.ExitCode in list(NagiosCode):
self._parse_output() self._parse_output()
logging.info(f"Output is {self.Output}.") logging.info(f"Output is {self.Output}")
logging.info(f"Additional output is {self.AdditionalOutput}.") logging.info(f"Additional output is {self.AdditionalOutput}")
else: else:
logging.warning( logging.warning(
"Invalid plugin return code, skipping output parsing." "Invalid plugin return code, skipping output parsing."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment