From 31a27229f4c23c6980d807596e03c00de3bc1f82 Mon Sep 17 00:00:00 2001 From: Justus Grunow Date: Wed, 7 May 2025 22:10:38 -0400 Subject: [PATCH] WIP passing args to plugin as dict --- hosts.yaml | 3 ++- monimon.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts.yaml b/hosts.yaml index 70c9b17..332678d 100644 --- a/hosts.yaml +++ b/hosts.yaml @@ -4,7 +4,8 @@ hosts: hostname: webassets.confederationcollege.ca actions: - ping - - httpcheck + - httpcheck: + endpoint: https://webassets.confederationcollege.ca secureassets: hostname: secureassets.confederationcollege.ca actions: diff --git a/monimon.py b/monimon.py index 0e258de..3aee8d9 100755 --- a/monimon.py +++ b/monimon.py @@ -16,5 +16,8 @@ with open('hosts.yaml', 'r') as file: for host, details in hosts['hosts'].items(): for action in details['actions']: + !!! arguments = {'hostname': } + result = getattr(plugins[action], action)(details['hostname']) + #print(f"{host}\t{action}\t{result[0]}\t{result[1]}") print(row_format.format(host, action, result[0], result[1]))