Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dockers/docker-telemetry-watchdog/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
ARG BASE=docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
ARG BASE=docker-sonic-gnmi-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Integrate SHOW API probe into telemetry watchdog. We want the watch dog can catch the bad SHOW command implement.

->

Integrate SHOW API probe into telemetry watchdog. We want the watchdog to catch the bad SHOW command implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Integrate SHOW API probe into telemetry watchdog. We want the watch dog can catch the bad SHOW command implement.

->

Integrate SHOW API probe into telemetry watchdog. We want the watchdog to catch the bad SHOW command implementation.

Thanks, fixed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to add DEPENDS in rule to make sure GNMI is built first for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to add DEPENDS in rule to make sure GNMI is built first for this.

Thanks, fixed


FROM $BASE AS builder

Expand Down Expand Up @@ -36,6 +36,7 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
# Copy the compiled Rust binary from the builder stage
COPY --from=builder /watchdog/target/release/telemetry_watchdog /usr/bin/telemetry_watchdog
RUN chmod +x /usr/bin/telemetry_watchdog
COPY --from=builder /watchdog/src/cmd_list.json /cmd_list.json

FROM $BASE

Expand Down
60 changes: 60 additions & 0 deletions dockers/docker-telemetry-watchdog/watchdog/src/cmd_list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"xpaths": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue with this is that

  1. We arent testing options with the xpath in this case, user can pass in options for example --interface.
  2. There are required arguments for some commands that need to be passed in, and these are usually like interface name. I dont know if the best way would to be hardcode an interface to check for all devices like Ethernet0, or if we can grab an oper up/admin up one from the host?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue with this is that

  1. We arent testing options with the xpath in this case, user can pass in options for example --interface.
  2. There are required arguments for some commands that need to be passed in, and these are usually like interface name. I dont know if the best way would to be hardcode an interface to check for all devices like Ethernet0, or if we can grab an oper up/admin up one from the host?

You are right, the commands with parameters are complicated, we don't plan to support for now, we support these common xpath at this stage. We can add more xpath with specific fixed parameters as you mentioned if we need later.

"buffer_pool/persistent-watermark",
"buffer_pool/watermark",
"clock",
"clock/timezones",
"dropcounters/capabilities",
"dropcounters/configuration",
"dropcounters/counts",
"ecn",
"headroom-pool/persistent-watermark",
"headroom-pool/watermark",
"interfaces/alias",
"interfaces/counters",
"interfaces/counters/rif",
"interfaces/description",
"interfaces/fec/status",
"interfaces/flap",
"interfaces/neighbor/expected",
"interfaces/naming_mode",
"interfaces/portchannel",
"interfaces/status",
"interfaces/switchport/config",
"interfaces/switchport/status",
"interfaces/transceiver/error-status",
"interfaces/transceiver/presence",
"interfaces/transceiver/lpmode",
"ipv6/bgp/neighbors",
"ipv6/bgp/network",
"ipv6/bgp/summary",
"ipv6/fib",
"ipv6/interfaces",
"ipv6/link-local-mode",
"ipv6/prefix-list",
"ipv6/protocol",
"ipv6/route",
"lldp/neighbors",
"lldp/table",
"mac",
"mac/aging-time",
"mmu",
"processes",
"processes/memory",
"processes/summary",
"queue/counters",
"queue/wredcounters",
"queue/watermark",
"queue/watermark/all",
"queue/watermark/unicast",
"queue/watermark/multicast",
"reboot-cause/history",
"services",
"srv6/stats",
"system-memory",
"uptime",
"version",
"vlan/brief",
"watermark/telemetry/interval"
]
}
Loading
Loading