Skip to content

Commit

Permalink
[bugfix] Account for 3-part node descriptions (#868)
Browse files Browse the repository at this point in the history
* Make node description parsing more flexible

* PR feedback
  • Loading branch information
PaulJKim authored Jan 7, 2025
1 parent ec6dae3 commit 1bffc1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/monitoring/uptime.ex
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ defmodule Monitoring.Uptime do
defp get_log_fields(%{"description" => description, "is_online" => is_online} = node) do
node_type = get_node_type(node)

[line, station, device_id, maybe_sign_zone] = String.split(description, ":")
[line, station, device_id | rest] = String.split(description, ":")
maybe_sign_zone = List.first(rest)

log_fields = [
tag: "device_uptime",
Expand Down

0 comments on commit 1bffc1d

Please sign in to comment.