'Get the latest data from the Netdata REST API.'

def update(self):

    try:
        response = requests.get(self._resource, timeout=5)
        det = response.json()
        self.data = {k: v for (k, v) in zip(det['labels'], det['data'][0])}
        self.available = True
    except requests.exceptions.ConnectionError:
        _LOGGER.error('Connection    error:    %s', urlsplit(self._resource)[1])
        self.data = None
        self.available = False
