OCT 1. 移除多余硬件监控配置项
This commit is contained in:
parent
465acf530b
commit
cf5375c893
|
@ -24,11 +24,6 @@ application:
|
||||||
memory = true; # 是否开启内存监控
|
memory = true; # 是否开启内存监控
|
||||||
disk = true; # 是否开启磁盘空间占用监控
|
disk = true; # 是否开启磁盘空间占用监控
|
||||||
sensor = true; # 是否开启传感器状态监控
|
sensor = true; # 是否开启传感器状态监控
|
||||||
|
|
||||||
cpu_refresh = 1; # CPU 状态刷新频率(秒)
|
|
||||||
mem_refresh = 10; # 内存状态刷新频率(秒)
|
|
||||||
disk_refresh = 10; # 磁盘状态刷新频率(秒)
|
|
||||||
sensor_refresh = 10; # 传感器状态刷新频率(秒)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# 数据库相关配置
|
# 数据库相关配置
|
||||||
|
|
|
@ -73,11 +73,6 @@ static CFG_ITEM g_cfgItem[] = {
|
||||||
DEF_CFG_ITEM(CFG_WATCH_MEMORY, "watch_params.memory", VAL_BOOL, "1", "Monitor memory information"),
|
DEF_CFG_ITEM(CFG_WATCH_MEMORY, "watch_params.memory", VAL_BOOL, "1", "Monitor memory information"),
|
||||||
DEF_CFG_ITEM(CFG_WATCH_DISK, "watch_params.disk", VAL_BOOL, "1", "Monitor disk partition information"),
|
DEF_CFG_ITEM(CFG_WATCH_DISK, "watch_params.disk", VAL_BOOL, "1", "Monitor disk partition information"),
|
||||||
DEF_CFG_ITEM(CFG_WATCH_SENSOR, "watch_params.sensor", VAL_BOOL, "1", "Sensor information refresh frequency"),
|
DEF_CFG_ITEM(CFG_WATCH_SENSOR, "watch_params.sensor", VAL_BOOL, "1", "Sensor information refresh frequency"),
|
||||||
/* 系统监控设备刷频率 */
|
|
||||||
DEF_CFG_ITEM(CFG_CPU_REFRESH, "watch_params.cpu_refresh", VAL_INT, "10", "CPU information refresh frequency"),
|
|
||||||
DEF_CFG_ITEM(CFG_MEM_REFRESH, "watch_params.mem_refresh", VAL_INT, "10", "Memory information refresh frequency"),
|
|
||||||
DEF_CFG_ITEM(CFG_DISK_REFRESH, "watch_params.disk_refresh", VAL_INT, "10", "Disk information refresh frequency"),
|
|
||||||
DEF_CFG_ITEM(CFG_SENSOR_REFRESH, "watch_params.sensor_refresh", VAL_INT, "10", "Sensor information refresh frequency"),
|
|
||||||
/* 数据库相配置 */
|
/* 数据库相配置 */
|
||||||
/* Redis配置 */
|
/* Redis配置 */
|
||||||
#ifdef USED_REDIS
|
#ifdef USED_REDIS
|
||||||
|
|
|
@ -121,22 +121,6 @@ int cfg_get_watch_sensor() {
|
||||||
return cfg_get_bool_value(CFG_WATCH_SENSOR);
|
return cfg_get_bool_value(CFG_WATCH_SENSOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int cfg_get_cpu_refresh_period() {
|
|
||||||
return cfg_get_integral_value(CFG_CPU_REFRESH);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int cfg_get_mem_refresh_period() {
|
|
||||||
return cfg_get_integral_value(CFG_MEM_REFRESH);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int cfg_get_disk_refresh_period() {
|
|
||||||
return cfg_get_integral_value(CFG_DISK_REFRESH);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int cfg_get_sensor_refresh_period() {
|
|
||||||
return cfg_get_integral_value(CFG_SENSOR_REFRESH);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef USED_SQLITE
|
#ifdef USED_SQLITE
|
||||||
const char *cfg_get_sqlite_db_name() {
|
const char *cfg_get_sqlite_db_name() {
|
||||||
return cfg_get_string_value(CFG_DB_SQLITE_DB_NAME);
|
return cfg_get_string_value(CFG_DB_SQLITE_DB_NAME);
|
||||||
|
|
|
@ -41,10 +41,6 @@ typedef enum {
|
||||||
CFG_WATCH_MEMORY,
|
CFG_WATCH_MEMORY,
|
||||||
CFG_WATCH_DISK,
|
CFG_WATCH_DISK,
|
||||||
CFG_WATCH_SENSOR,
|
CFG_WATCH_SENSOR,
|
||||||
CFG_CPU_REFRESH,
|
|
||||||
CFG_MEM_REFRESH,
|
|
||||||
CFG_DISK_REFRESH,
|
|
||||||
CFG_SENSOR_REFRESH,
|
|
||||||
#ifdef USED_REDIS
|
#ifdef USED_REDIS
|
||||||
CFG_DB_REDIS_SERVER,
|
CFG_DB_REDIS_SERVER,
|
||||||
CFG_DB_REDIS_PORT,
|
CFG_DB_REDIS_PORT,
|
||||||
|
@ -94,10 +90,6 @@ int cfg_get_watch_cpu();
|
||||||
int cfg_get_watch_memory();
|
int cfg_get_watch_memory();
|
||||||
int cfg_get_watch_disk();
|
int cfg_get_watch_disk();
|
||||||
int cfg_get_watch_sensor();
|
int cfg_get_watch_sensor();
|
||||||
unsigned int cfg_get_cpu_refresh_period();
|
|
||||||
unsigned int cfg_get_mem_refresh_period();
|
|
||||||
unsigned int cfg_get_disk_refresh_period();
|
|
||||||
unsigned int cfg_get_sensor_refresh_period();
|
|
||||||
#ifdef USED_REDIS
|
#ifdef USED_REDIS
|
||||||
const char *cfg_get_redis_server();
|
const char *cfg_get_redis_server();
|
||||||
int cfg_get_redis_port();
|
int cfg_get_redis_port();
|
||||||
|
@ -114,8 +106,10 @@ const char *cfg_get_mysql_database();
|
||||||
const char *cfg_get_sqlite_db_name();
|
const char *cfg_get_sqlite_db_name();
|
||||||
const char *cfg_get_sqlite_passwd();
|
const char *cfg_get_sqlite_passwd();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ZEROMQ_ON
|
||||||
int cfg_get_zero_mq_port();
|
int cfg_get_zero_mq_port();
|
||||||
const char *cfg_get_zero_mq_data_path();
|
const char *cfg_get_zero_mq_data_path();
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *cfg_get_string_value(CONFIG_ITEM_ID id);
|
const char *cfg_get_string_value(CONFIG_ITEM_ID id);
|
||||||
c_vector cfg_get_vector(CONFIG_ITEM_ID id);
|
c_vector cfg_get_vector(CONFIG_ITEM_ID id);
|
||||||
|
|
Loading…
Reference in New Issue