check for keys first
@@ -157,6 +157,7 @@ class Monitor:
second_conf = '0'
third_conf = '0'
ipv4_os = 'NO DATA'
+ if 'mac_addresses' in self.s.endpoints[endpoint].metadata:
for mac in self.s.endpoints[endpoint].metadata['mac_addresses']:
newest = 0
for timestamp in self.s.endpoints[endpoint].metadata['mac_addresses'][mac]:
@@ -168,6 +169,7 @@ class Monitor:
top_conf = self.s.endpoints[endpoint].metadata['mac_addresses'][mac][timestamp]['confidences'][0]
second_conf = self.s.endpoints[endpoint].metadata['mac_addresses'][mac][timestamp]['confidences'][1]
third_conf = self.s.endpoints[endpoint].metadata['mac_addresses'][mac][timestamp]['confidences'][2]
+ if 'ipv4_addresses' in self.s.endpoints[endpoint].metadata:
for ip in self.s.endpoints[endpoint].metadata['ipv4_addresses']:
if ip == self.s.endpoints[endpoint].endpoint_data['ipv4']:
if 'os' in self.s.endpoints[endpoint].metadata['ipv4_addresses'][ip]:
