memory leak and enable
This commit is contained in:
parent
9756016d22
commit
b82cd97b80
|
@ -107,7 +107,7 @@ void dmSendMonitorReport() {
|
||||||
dmGetSmMonitorInfo(pDnode);
|
dmGetSmMonitorInfo(pDnode);
|
||||||
monSendReport();
|
monSendReport();
|
||||||
|
|
||||||
monSendPromReport();
|
//monSendPromReport();
|
||||||
}
|
}
|
||||||
|
|
||||||
void dmGetVnodeLoads(SMonVloadInfo *pInfo) {
|
void dmGetVnodeLoads(SMonVloadInfo *pInfo) {
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "thttp.h"
|
#include "thttp.h"
|
||||||
#include "ttime.h"
|
#include "ttime.h"
|
||||||
#include "taos_monitor.h"
|
#include "taos_monitor.h"
|
||||||
|
#include "tglobal.h"
|
||||||
|
|
||||||
static SMonitor tsMonitor = {0};
|
static SMonitor tsMonitor = {0};
|
||||||
static char* tsMonUri = "/report";
|
static char* tsMonUri = "/report";
|
||||||
|
@ -553,7 +554,7 @@ void monSendReport() {
|
||||||
void monSendPromReport() {
|
void monSendPromReport() {
|
||||||
char *pCont = (char *)taos_collector_registry_bridge(
|
char *pCont = (char *)taos_collector_registry_bridge(
|
||||||
TAOS_COLLECTOR_REGISTRY_DEFAULT, taosGetTimestamp(TSDB_TIME_PRECISION_MILLI));
|
TAOS_COLLECTOR_REGISTRY_DEFAULT, taosGetTimestamp(TSDB_TIME_PRECISION_MILLI));
|
||||||
uInfoL("report cont:\n%s\n", pCont);
|
//uInfoL("report cont:\n%s\n", pCont);
|
||||||
if (pCont != NULL) {
|
if (pCont != NULL) {
|
||||||
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
||||||
if (taosSendHttpReport(tsMonitor.cfg.server, tsMonUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag) != 0) {
|
if (taosSendHttpReport(tsMonitor.cfg.server, tsMonUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag) != 0) {
|
||||||
|
@ -565,7 +566,8 @@ void monSendPromReport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void monSendContent(char *pCont) {
|
void monSendContent(char *pCont) {
|
||||||
uInfoL("report cont:\n%s\n", pCont);
|
if (!tsEnableMonitor || tsMonitorFqdn[0] == 0 || tsMonitorPort == 0) return;
|
||||||
|
//uInfoL("report cont:\n%s\n", pCont);
|
||||||
if (pCont != NULL) {
|
if (pCont != NULL) {
|
||||||
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
|
||||||
if (taosSendHttpReport(tsMonitor.cfg.server, tsMonUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag) != 0) {
|
if (taosSendHttpReport(tsMonitor.cfg.server, tsMonUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag) != 0) {
|
||||||
|
|
Loading…
Reference in New Issue