diff --git a/src/plugins/monitor/src/monMain.c b/src/plugins/monitor/src/monMain.c index fea793fa860fd17ff30bcecae1436180bc6b34bf..107d3be228685be9ecd92125f226749a8cf20588 100644 --- a/src/plugins/monitor/src/monMain.c +++ b/src/plugins/monitor/src/monMain.c @@ -204,6 +204,7 @@ static void monBuildMonitorSql(char *sql, int32_t cmd) { ", disk_used float, disk_total int" ", band_speed float" ", io_read float, io_write float" + ", io_read_rate float, io_write_rate float" ", req_http int, req_select int, req_insert int" ") tags (dnodeid int, fqdn binary(%d))", tsMonitorDbName, TSDB_FQDN_LEN); @@ -325,7 +326,10 @@ static int32_t monBuildIoSql(char *sql) { monDebug("failed to get io info"); } - return sprintf(sql, ", %f, %f", readKB, writeKB); + float readRate = readKB/tsMonitorInterval; + float writeRate = writeKB/tsMonitorInterval; + + return sprintf(sql, ", %f, %f, %f, %f", readKB, writeKB, readRate, writeRate); } static void monSaveSystemInfo() {