TDengine/source/libs/monitor/inc/monInt.h

70 lines
1.8 KiB
C
Raw Normal View History

2022-03-02 06:00:56 +00:00
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_MONITOR_INT_H_
#define _TD_MONITOR_INT_H_
#include "monitor.h"
2023-11-02 10:44:18 +00:00
#include "query.h"
2022-03-02 06:00:56 +00:00
2022-03-02 07:41:19 +00:00
#include "tjson.h"
2024-01-24 09:44:44 +00:00
#include "thash.h"
2022-03-02 07:41:19 +00:00
typedef struct {
int64_t curTime;
int64_t lastTime;
SJson *pJson;
SMonLogs log;
SMonDmInfo dmInfo;
SMonMmInfo mmInfo;
SMonVmInfo vmInfo;
SMonSmInfo smInfo;
SMonQmInfo qmInfo;
SMonBmInfo bmInfo;
2022-03-02 07:41:19 +00:00
} SMonInfo;
2022-03-04 07:15:29 +00:00
typedef struct {
2022-03-19 16:47:45 +00:00
TdThreadMutex lock;
SArray *logs; // array of SMonLogItem
SMonCfg cfg;
int64_t lastTime;
SMonDmInfo dmInfo;
SMonMmInfo mmInfo;
SMonVmInfo vmInfo;
SMonSmInfo smInfo;
SMonQmInfo qmInfo;
SMonBmInfo bmInfo;
2024-01-24 09:44:44 +00:00
SHashObj *metrics;
2022-03-04 07:15:29 +00:00
} SMonitor;
2024-01-24 09:44:44 +00:00
void monGenClusterInfoTable(SMonInfo *pMonitor);
void monGenVgroupInfoTable(SMonInfo *pMonitor);
void monGenDnodeInfoTable(SMonInfo *pMonitor);
void monGenDnodeStatusInfoTable(SMonInfo *pMonitor);
void monGenDataDiskTable(SMonInfo *pMonitor);
void monGenLogDiskTable(SMonInfo *pMonitor);
void monGenMnodeRoleTable(SMonInfo *pMonitor);
void monGenVnodeRoleTable(SMonInfo *pMonitor);
void monSendPromReport();
void monInitMonitorFW();
void monCleanupMonitorFW();
2022-03-02 06:00:56 +00:00
#ifdef __cplusplus
}
#endif
#endif /*_TD_MONITOR_INT_H_*/