提交 fbff762e 编写于 作者: G Ganlin Zhao

[TD-6452]<feature>: taoskeeper add HTTP status codes

上级 79a0b386
...@@ -164,6 +164,7 @@ static void monSaveSlowQueryInfo(); ...@@ -164,6 +164,7 @@ static void monSaveSlowQueryInfo();
static void monSaveDisksInfo(); static void monSaveDisksInfo();
static void monSaveGrantsInfo(); static void monSaveGrantsInfo();
static void monSaveHttpReqInfo(); static void monSaveHttpReqInfo();
static void monClearStatisInfo();
static void *monThreadFunc(void *param); static void *monThreadFunc(void *param);
static void monBuildMonitorSql(char *sql, int32_t cmd); static void monBuildMonitorSql(char *sql, int32_t cmd);
static void monInitHttpStatusHashTable(); static void monInitHttpStatusHashTable();
...@@ -313,6 +314,7 @@ static void *monThreadFunc(void *param) { ...@@ -313,6 +314,7 @@ static void *monThreadFunc(void *param) {
monSaveGrantsInfo(); monSaveGrantsInfo();
monSaveHttpReqInfo(); monSaveHttpReqInfo();
monSaveSystemInfo(); monSaveSystemInfo();
monClearStatisInfo();
} }
} }
} }
...@@ -829,10 +831,7 @@ static int32_t monBuildDnodeReqSql(char *sql) { ...@@ -829,10 +831,7 @@ static int32_t monBuildDnodeReqSql(char *sql) {
float httpReqRate = dInfo.httpReqNum / interval; float httpReqRate = dInfo.httpReqNum / interval;
float queryReqRate = (dInfo.queryReqNum - monQueryReqCnt)/ interval; float queryReqRate = (dInfo.queryReqNum - monQueryReqCnt)/ interval;
float submitReqRate = (dInfo.submitReqNum - monSubmitReqCnt) / interval; float submitReqRate = (dInfo.submitReqNum - monSubmitReqCnt) / interval;
dnodeClearStatisInfo();
float submitRowRate = (vInfo.submitRowNum - monSubmitReqCnt) / interval; float submitRowRate = (vInfo.submitRowNum - monSubmitReqCnt) / interval;
vnodeClearStatisInfo();
return sprintf(sql, ", %d, %f, %d, %f, %d, %d, %f, %d, %d, %f", dInfo.httpReqNum, httpReqRate, return sprintf(sql, ", %d, %f, %d, %f, %d, %d, %f, %d, %d, %f", dInfo.httpReqNum, httpReqRate,
dInfo.queryReqNum - monQueryReqCnt, queryReqRate, dInfo.queryReqNum - monQueryReqCnt, queryReqRate,
...@@ -1230,6 +1229,11 @@ static void monSaveHttpReqInfo() { ...@@ -1230,6 +1229,11 @@ static void monSaveHttpReqInfo() {
} }
} }
static void monClearStatisInfo() {
dnodeClearStatisInfo();
vnodeClearStatisInfo();
}
static void monExecSqlCb(void *param, TAOS_RES *result, int32_t code) { static void monExecSqlCb(void *param, TAOS_RES *result, int32_t code) {
int32_t c = taos_errno(result); int32_t c = taos_errno(result);
if (c != TSDB_CODE_SUCCESS) { if (c != TSDB_CODE_SUCCESS) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册