Verified Commit 11d6e9c8 authored by Adrian Schollmeyer's avatar Adrian Schollmeyer
Browse files

generator/host: Add support for procs checks

parent 5b06c218
......@@ -87,7 +87,7 @@ class Icinga2Host:
def add_procs_check(self, name):
self.procs.append(Icinga2ProcsCheck(name))
self.procs.append(name)
def add_apt_active(self):
......@@ -136,11 +136,6 @@ class Icinga2Host:
return template.render(vars=self)
class Icinga2ProcsCheck:
def __init__(self, name):
self.name = name
def main():
argument_parser = create_argument_parser()
args = argument_parser.parse_args()
......@@ -344,6 +339,13 @@ def create_icinga2_host_object_from_netbox(netbox, device_name):
pass
except KeyError:
pass
try:
if monitoring_config_context["procs"]:
for proc in monitoring_config_context["procs"]:
host.add_procs_check(proc)
except KeyError:
pass
except KeyError as e:
pass # So there is no extra monitoring config. Who cares anyway?
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment