Skip to content

Commit

Permalink
Updated Armis Device Data Connector Code
Browse files Browse the repository at this point in the history
  • Loading branch information
niralishah-crest committed Feb 14, 2025
1 parent 2e22d67 commit d0e9806
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,7 @@
}

CHECKPOINT_TABLE_NAME = "ArmisDeviceCheckpoint"
DEVICE_FIELD_LIST = [
"accessSwitch",
"category",
"firstSeen",
"id",
"ipAddress",
"lastSeen",
"macAddress",
"manufacturer",
"model",
"name",
"operatingSystem",
"operatingSystemVersion",
"riskLevel",
"sensor",
"site",
"tags",
"type",
"user",
"visibility",
"serialNumber",
"plcModule",
"purdueLevel",
"firmwareVersion",
"dataSources"
]

MAX_RETRY = 5
FUNCTION_APP_TIMEOUT_SECONDS = 570
body = ""
Expand Down Expand Up @@ -288,7 +263,6 @@ def _fetch_device_data(
"aql": aql_data,
"orderBy": "lastSeen",
"length": 1000,
"fields": ",".join(DEVICE_FIELD_LIST),
}
while self._data_device_from is not None:
if int(time.time()) >= self.start_time + FUNCTION_APP_TIMEOUT_SECONDS:
Expand Down Expand Up @@ -329,7 +303,6 @@ def _fetch_device_data(
last_seen_time = datetime.datetime.strptime(
last_seen_time, "%Y-%m-%dT%H:%M:%S"
)
last_seen_time += datetime.timedelta(seconds=1)
last_seen_time = last_seen_time.strftime("%Y-%m-%dT%H:%M:%S")
checkpoint_table_object.merge(
"armisdevice",
Expand Down

0 comments on commit d0e9806

Please sign in to comment.