Skip to content

Commit cfee4d0

Browse files
Park Juhyungmajecty
authored andcommitted
Do not send disk usage alarm when the data is null value
When the Agent client can't get disk information, it fills all data to zero. The Agent server should ignore the null value data.
1 parent 6d3744f commit cfee4d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/agent/agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl Agent {
344344

345345
const ONE_GB: i64 = 1_000_000_000;
346346
if !disk_usage_alert_sent {
347-
if disk_usage.available < ONE_GB {
347+
if disk_usage.total != 0 && disk_usage.available < ONE_GB {
348348
self.noti.warn(
349349
&network_id,
350350
&format!("{} has only {} MB free space.", node_name, disk_usage.available / 1_000_000),

0 commit comments

Comments
 (0)