Per HLD , a user can define own checkers to be executed on health checks in a form provided below, in file /usr/share/sonic/device//system_health_monitoring_config.json
Attempt to add any script demonstrates that it does not start
Steps to reproduce the issue:
create a sample file at "~/checker_output.txt" with content below that adheres to output format a user-defined checker should produce
ExternalCategory
ExternalService:Service is not working
ExternalDevice:Device is broken
add a new checker that just outputs the created text file, by appending the cat ~/checker_output.txt into /usr/share/sonic/device/<platform>/system_health_monitoring_config.json. On instance:
Description
Per HLD , a user can define own checkers to be executed on health checks in a form provided below, in file /usr/share/sonic/device//system_health_monitoring_config.json
Attempt to add any script demonstrates that it does not start
Steps to reproduce the issue:
cat ~/checker_output.txt
into/usr/share/sonic/device/<platform>/system_health_monitoring_config.json
. On instance:Describe the results you received:
No parsed check results, an error is logged
Describe the results you expected:
Parsed result are shown as
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
Investigation showed the issue is at https://github.com/sonic-net/sonic-buildimage/blob/master/src/system-health/health_checker/utils.py#L11 .
subprocess.Popen
requires a list with a command name and args followed, but just a single string is provided instead.