enh/TD-32407-unsafe-monitor-fix-case
This commit is contained in:
parent
1fcedc2386
commit
f5b1eccad0
|
@ -778,7 +778,7 @@ void monGenVnodeRoleTable(SMonInfo *pMonitor){
|
||||||
|
|
||||||
void monSendPromReport() {
|
void monSendPromReport() {
|
||||||
char ts[50] = {0};
|
char ts[50] = {0};
|
||||||
tsnprintf(ts, 50, "%" PRId64, taosGetTimestamp(TSDB_TIME_PRECISION_MILLI));
|
(void)tsnprintf(ts, 50, "%" PRId64, taosGetTimestamp(TSDB_TIME_PRECISION_MILLI));
|
||||||
|
|
||||||
char* promStr = NULL;
|
char* promStr = NULL;
|
||||||
char* pCont = (char *)taos_collector_registry_bridge_new(TAOS_COLLECTOR_REGISTRY_DEFAULT, ts, "%" PRId64, &promStr);
|
char* pCont = (char *)taos_collector_registry_bridge_new(TAOS_COLLECTOR_REGISTRY_DEFAULT, ts, "%" PRId64, &promStr);
|
||||||
|
@ -794,7 +794,7 @@ void monSendPromReport() {
|
||||||
if (pCont != NULL) {
|
if (pCont != NULL) {
|
||||||
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
||||||
char tmp[100] = {0};
|
char tmp[100] = {0};
|
||||||
tsnprintf(tmp, 100, "0x%" PRIxLEAST64, tGenQid64(tsMonitor.dnodeId));
|
(void)tsnprintf(tmp, 100, "0x%" PRIxLEAST64, tGenQid64(tsMonitor.dnodeId));
|
||||||
uDebug("report cont with QID:%s", tmp);
|
uDebug("report cont with QID:%s", tmp);
|
||||||
if (taosSendHttpReportWithQID(tsMonitor.cfg.server, tsMonFwUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag,
|
if (taosSendHttpReportWithQID(tsMonitor.cfg.server, tsMonFwUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag,
|
||||||
tmp) != 0) {
|
tmp) != 0) {
|
||||||
|
|
|
@ -248,7 +248,7 @@ static void monGenBasicJsonBasic(SMonInfo *pMonitor) {
|
||||||
SJson *pJson = pMonitor->pJson;
|
SJson *pJson = pMonitor->pJson;
|
||||||
char buf[40] = {0};
|
char buf[40] = {0};
|
||||||
|
|
||||||
tsnprintf(buf, 40, "%" PRId64, taosGetTimestamp(TSDB_TIME_PRECISION_MILLI));
|
(void)tsnprintf(buf, 40, "%" PRId64, taosGetTimestamp(TSDB_TIME_PRECISION_MILLI));
|
||||||
if (tjsonAddStringToObject(pJson, "ts", buf) != 0) uError("failed to add ts");
|
if (tjsonAddStringToObject(pJson, "ts", buf) != 0) uError("failed to add ts");
|
||||||
if (tjsonAddDoubleToObject(pJson, "dnode_id", pInfo->dnode_id) != 0) uError("failed to add dnode_id");
|
if (tjsonAddDoubleToObject(pJson, "dnode_id", pInfo->dnode_id) != 0) uError("failed to add dnode_id");
|
||||||
if (tjsonAddStringToObject(pJson, "dnode_ep", pInfo->dnode_ep) != 0) uError("failed to add dnode_ep");
|
if (tjsonAddStringToObject(pJson, "dnode_ep", pInfo->dnode_ep) != 0) uError("failed to add dnode_ep");
|
||||||
|
@ -643,7 +643,7 @@ void monSendReportBasic(SMonInfo *pMonitor) {
|
||||||
if (pCont != NULL) {
|
if (pCont != NULL) {
|
||||||
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
||||||
char tmp[100] = {0};
|
char tmp[100] = {0};
|
||||||
tsnprintf(tmp, 100, "0x%" PRIxLEAST64, tGenQid64(tsMonitor.dnodeId));
|
(void)tsnprintf(tmp, 100, "0x%" PRIxLEAST64, tGenQid64(tsMonitor.dnodeId));
|
||||||
uDebug("report cont basic with QID:%s", tmp);
|
uDebug("report cont basic with QID:%s", tmp);
|
||||||
if (taosSendHttpReportWithQID(tsMonitor.cfg.server, tsMonFwBasicUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag,
|
if (taosSendHttpReportWithQID(tsMonitor.cfg.server, tsMonFwBasicUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag,
|
||||||
tmp) != 0) {
|
tmp) != 0) {
|
||||||
|
@ -698,7 +698,7 @@ void monSendContent(char *pCont, const char *uri) {
|
||||||
}
|
}
|
||||||
if (pCont != NULL) {
|
if (pCont != NULL) {
|
||||||
char tmp[100] = {0};
|
char tmp[100] = {0};
|
||||||
tsnprintf(tmp, 100, "0x%" PRIxLEAST64, tGenQid64(tsMonitor.dnodeId));
|
(void)tsnprintf(tmp, 100, "0x%" PRIxLEAST64, tGenQid64(tsMonitor.dnodeId));
|
||||||
uInfoL("report client cont with QID:%s", tmp);
|
uInfoL("report client cont with QID:%s", tmp);
|
||||||
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
||||||
if (taosSendHttpReportWithQID(tsMonitor.cfg.server, uri, tsMonitor.cfg.port, pCont, strlen(pCont), flag, tmp) !=
|
if (taosSendHttpReportWithQID(tsMonitor.cfg.server, uri, tsMonitor.cfg.port, pCont, strlen(pCont), flag, tmp) !=
|
||||||
|
|
Loading…
Reference in New Issue