check if labels
@@ -92,6 +92,7 @@ class Monitor:
self.logger.debug(f'endpoint metadata: {endpoint.metadata}')
if 'mac_addresses' in endpoint.metadata:
for mac in endpoint.metadata['mac_addresses']:
+ if 'labels' in endpoint.metadata['mac_addresses'][mac]:
role = endpoint.metadata['mac_addresses'][mac]['labels'][0]
if 'ipv4_addresses' in endpoint.metadata:
for ip in endpoint.metadata['ipv4_addresses']:
