Fix pids column in docker_container_stats table (#6965)

Add missing string conversion to docker_container_stats table
This commit is contained in:
Ryan Mack 2021-02-24 09:13:36 -05:00 committed by GitHub
parent d80bb56534
commit 0717ab79b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -855,7 +855,7 @@ QueryData genContainerStats(QueryContext& context) {
Row r; Row r;
r["id"] = id; r["id"] = id;
r["name"] = container.get<std::string>("name", ""); r["name"] = container.get<std::string>("name", "");
r["pids"] = container.get<int>("pids_stats.current", 0); r["pids"] = INTEGER(container.get<int>("pids_stats.current", 0));
const std::string& read = container.get<std::string>("read", ""); const std::string& read = container.get<std::string>("read", "");
long read_unix_time = getUnixTime(read, false); long read_unix_time = getUnixTime(read, false);
r["read"] = BIGINT(read_unix_time); r["read"] = BIGINT(read_unix_time);