Check interfaces KeyError for network data

Change-Id: Ib01688d03aebb9b7f21e33792d7d3ba235b7af72
This commit is contained in:
Kaiyan Sheng 2017-11-29 14:38:23 -07:00
parent 530599c705
commit 02fef2f314
1 changed files with 2 additions and 0 deletions

View File

@ -289,6 +289,8 @@ class Kubernetes(checks.AgentCheck):
METRIC_TYPES_UNITS[metric_name][1])
def _parse_network(self, network_data, container_dimensions, pod_key, pod_metrics):
if 'interfaces' not in network_data:
return
network_interfaces = network_data['interfaces']
network_metrics = CADVISOR_METRICS['network_metrics']
sum_network_interfaces = {}