Skip to content

Commit c5b8a85

Browse files
committed
Suppress ping output from anms-core status page to reduce log noise.
1 parent 892f3bc commit c5b8a85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

anms-core/anms/routes/system_status.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ def get_containers_status():
107107
# If no other check defined, test that host can be pinged
108108
try:
109109
cmd = ["ping", "-c1", f"-W{timeout}", hostname]
110-
result = subprocess.run(cmd, shell=False)
110+
111+
# Capturing output to suppress it (otherwise it floods system log)
112+
result = subprocess.run(cmd, shell=False, capture_output=True, text=True)
111113
if result.returncode == 0:
112114
statuses[name] = "healthy"
113115
else:

0 commit comments

Comments
 (0)