Change value type of params in memory_checker (#12797)

Fix error when calling events API, required value is string, passing float
This commit is contained in:
Zain Budhwani 2022-11-23 17:37:28 -08:00 committed by StormLiangMS
parent a338427948
commit d71bc0dd63

View File

@ -100,7 +100,7 @@ def check_memory_usage(events_handle, container_name, threshold_value):
syslog.syslog(syslog.LOG_INFO, "[{}]: Memory usage ({} Bytes) is larger than the threshold ({} Bytes)!"
.format(container_name, mem_usage_bytes, threshold_value))
# publish event
publish_events(events_handle, container_name, mem_usage_bytes, threshold_value)
publish_events(events_handle, container_name, str(mem_usage_bytes), str(threshold_value))
sys.exit(3)
else:
syslog.syslog(syslog.LOG_ERR, "[memory_checker] Failed to retrieve memory value from '{}'"