aboutsummaryrefslogtreecommitdiffstats
path: root/app/monitoring/setup
diff options
context:
space:
mode:
Diffstat (limited to 'app/monitoring/setup')
-rw-r--r--app/monitoring/setup/monitoring_check_handler.py3
-rw-r--r--app/monitoring/setup/monitoring_pnic.py9
2 files changed, 10 insertions, 2 deletions
diff --git a/app/monitoring/setup/monitoring_check_handler.py b/app/monitoring/setup/monitoring_check_handler.py
index 1c9a013..c453439 100644
--- a/app/monitoring/setup/monitoring_check_handler.py
+++ b/app/monitoring/setup/monitoring_check_handler.py
@@ -25,7 +25,8 @@ class MonitoringCheckHandler(MonitoringHandler, SpecialCharConverter):
host = self.inv.get_by_id(self.env, o['host'])
if host and 'ip_address' in host:
self.replacements['client_ip'] = host['ip_address']
- type_str = o['type'] if 'type' in o else 'link_' + o['link_type']
+ type_str = values['check_type'] if 'check_type' in values else \
+ (o['type'] if 'type' in o else 'link_' + o['link_type'])
file_type = 'client_check_' + type_str + '.json'
host = o['host']
sub_dir = '/host/' + host
diff --git a/app/monitoring/setup/monitoring_pnic.py b/app/monitoring/setup/monitoring_pnic.py
index fdc1c94..c1be96f 100644
--- a/app/monitoring/setup/monitoring_pnic.py
+++ b/app/monitoring/setup/monitoring_pnic.py
@@ -17,4 +17,11 @@ class MonitoringPnic(MonitoringSimpleObject):
# add monitoring setup for remote host
def create_setup(self, o):
- self.setup('host_pnic', o)
+ type = 'host_pnic'
+ env_config = self.configuration.get_env_config()
+ vpp_or_ovs = 'vpp' if 'VPP' in env_config['mechanism_drivers'] \
+ else 'ovs'
+ type_str = '{}_{}'.format(type, vpp_or_ovs)
+ self.setup(type, o, values={'check_type': type_str,
+ 'local_name': o['local_name']})
+