netenglabs / suzieq

Using network observability to operate and design healthier networks
https://www.stardustsystems.net/
Apache License 2.0
780 stars 104 forks source link

[Bug]: _clean_junos_data KeyError: 'bootupTimestamp' #903

Open PieterL75 opened 1 year ago

PieterL75 commented 1 year ago

Suzieq version

0.21

Install Type

hand deployed python

Python version

3.9

Impacted component

sq-poller

Steps to Reproduce

Add a junos device EX9208 Junos: 14.2R8.4 (yes I know...)

Expected Behavior

parsed bootuptimestamp

Observed Behavior

2023-02-28 04:46:28,243 - suzieq.poller.worker.services.service - ERROR - Processing data failed for service device on node 172.29.252.217 Traceback (most recent call last): File "/opt/suzieq/venv/lib/python3.9/site-packages/suzieq/poller/worker/services/service.py", line 819, in run result = self.process_data(output) File "/opt/suzieq/venv/lib/python3.9/site-packages/suzieq/poller/worker/services/service.py", line 478, in process_data return self.clean_data(result, data) File "/opt/suzieq/venv/lib/python3.9/site-packages/suzieq/poller/worker/services/service.py", line 537, in clean_data processed_data = dev_clean_fn(processed_data, raw_data) File "/opt/suzieq/venv/lib/python3.9/site-packages/suzieq/poller/worker/services/device.py", line 159, in _clean_junos_data entry['bootupTimestamp'], KeyError: 'bootupTimestamp'

Screenshots

WORKER 0: 2023-06-29 11:48:56,261 - suzieq.poller.worker.nodes.node - WARNING - 172.29.252.217:22 Unable to parse junos boot time from { WORKER 0: "system-uptime-information" : [

WORKER 0: "attributes" : {"xmlns" : "http://xml.juniper.net/junos/14.2R8/junos"}, WORKER 0: "current-time" : [

WORKER 0: "date-time" : [

WORKER 0: "data" : "2023-06-29 11:48:56 CEST", WORKER 0: "attributes" : {"junos:seconds" : "1688032136"}

WORKER 0: "system-booted-time" : [

WORKER 0: "date-time" : [

WORKER 0: "data" : "2021-12-10 22:33:05 CET", WORKER 0: "attributes" : {"junos:seconds" : "1639171985"}

WORKER 0: "time-length" : [

WORKER 0: "data" : "80w5d 12:15", WORKER 0: "attributes" : {"junos:seconds" : "48860151"}

WORKER 0: "protocols-started-time" : [

WORKER 0: "date-time" : [

WORKER 0: "data" : "2021-12-10 22:35:09 CET", WORKER 0: "attributes" : {"junos:seconds" : "1639172109"}

WORKER 0: "time-length" : [

WORKER 0: "data" : "80w5d 12:13", WORKER 0: "attributes" : {"junos:seconds" : "48860027"}

WORKER 0: "last-configured-time" : [

WORKER 0: "date-time" : [

WORKER 0: "data" : "2023-06-28 13:39:08 CEST", WORKER 0: "attributes" : {"junos:seconds" : "1687952348"}

WORKER 0: "time-length" : [

WORKER 0: "data" : "22:09:48", WORKER 0: "attributes" : {"junos:seconds" : "79788"}

WORKER 0: "user" : [

WORKER 0: "data" : "myuser"

WORKER 0: "uptime-information" : [

WORKER 0: "date-time" : [

WORKER 0: "data" : "11:48AM", WORKER 0: "attributes" : {"junos:seconds" : "1688032136"}

WORKER 0: "up-time" : [

WORKER 0: "data" : "565 days, 12:16", WORKER 0: "attributes" : {"junos:seconds" : "48860181"}

WORKER 0: "active-user-count" : [

WORKER 0: "data" : "1", WORKER 0: "attributes" : {"junos:format" : "1 user"}

WORKER 0: "load-average-1" : [

WORKER 0: "data" : "0.43"

WORKER 0: "load-average-5" : [

WORKER 0: "data" : "0.37"

WORKER 0: "load-average-15" : [

WORKER 0: "data" : "0.28"

Additional Context