nest checks for summary message type
This commit is contained in:
parent
84ca57eb47
commit
a2abee8456
1 changed files with 5 additions and 4 deletions
|
@ -73,7 +73,8 @@ class restic_exporter:
|
||||||
line_data = json.loads(line)
|
line_data = json.loads(line)
|
||||||
except json.decoder.JSONDecodeError as error:
|
except json.decoder.JSONDecodeError as error:
|
||||||
self._log.error(f"Error decoding line '{line}'. {error}")
|
self._log.error(f"Error decoding line '{line}'. {error}")
|
||||||
if 'message_type' in line_data and line_data['message_type'] == 'summary':
|
if 'message_type' in line_data:
|
||||||
|
if line_data['message_type'] == 'summary':
|
||||||
self.summary = line_data
|
self.summary = line_data
|
||||||
if 'snapshot_id' in line_data:
|
if 'snapshot_id' in line_data:
|
||||||
self.labels["snapshot_id"] = line_data['snapshot_id']
|
self.labels["snapshot_id"] = line_data['snapshot_id']
|
||||||
|
|
Loading…
Reference in a new issue