From 50f0d969d04a4a0bcf6ebb88a8cd98a09018877b Mon Sep 17 00:00:00 2001 From: slguan Date: Fri, 9 Aug 2019 16:59:57 +0800 Subject: [PATCH] fix issue #313 --- packaging/cfg/taos.cfg | 38 ++++++++++++++++++++++++--------- src/modules/http/src/tgHandle.c | 8 +++---- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 01ba21ca88..ae205ca19d 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -132,8 +132,36 @@ # start system monitor module in the cluster # enableMonitor 1 +# number of threads used to process http requests # httpMaxThreads 2 +# pre-allocated number of http sessions +# httpCacheSessions 100 + +# whether the telegraf table name contains the number of tags and the number of fields +# telegrafUseFieldNum 0 + +# enable table names generated by telegraf can be configured +# use /etc/taos/taos.telegraf.cfg as the configuration file, such as +# { +# "metrics": [ +# { +# "name" : "system", +# "tbname" : "system_uptime", +# "fields": [ +# "uptime" +# ] +# }, +# { +# "name": "system", +# "tbname" : "system_uptime_format", +# "fields": [ +# "uptime_format" +# ] +# } +# ] +# } + # The following parameter is used to limit the maximum number of lines in log files. # max number of rows per log filters # numOfLogLines 10000000 @@ -169,13 +197,3 @@ # debug flag for TAOS TIMER # tmrDebugFlag 131 - -########################### data directory configuration ############################ -# option mount_path tier_level -# dataDir /mnt/disk1/taos 0 -# dataDir /mnt/disk2/taos 0 -# dataDir /mnt/disk3/taos 0 -# dataDir /mnt/disk4/taos 0 -# dataDir /mnt/disk5/taos 0 -# dataDir /mnt/disk6/taos 1 -# dataDir /mnt/disk7/taos 1 diff --git a/src/modules/http/src/tgHandle.c b/src/modules/http/src/tgHandle.c index 1a166d48eb..43d9fca013 100644 --- a/src/modules/http/src/tgHandle.c +++ b/src/modules/http/src/tgHandle.c @@ -46,10 +46,10 @@ }, { "name": "cpu", - "tbname" : "cpu_time", + "tbname" : "cpu_usage", "fields": [ - "time_active", - "time_guest" + "usage_active", + "usage_guest" ] } ] @@ -68,7 +68,7 @@ static const char DEFAULT_TELEGRAF_CFG[] = "{\"name\":\"system\",\"tbname\":\"system_uptime\",\"fields\":[\"uptime\"]}," "{\"name\":\"system\",\"tbname\":\"system_uptime_format\",\"fields\":[\"uptime_format\"]}," "{\"name\":\"swap\",\"tbname\":\"swap_in\",\"fields\":[\"in\"]}," - "{\"name\":\"cpu\",\"tbname\":\"cpu_usage\",\"fields\":[\"usage_active\",\"usage_guest\"]}" + "{\"name\":\"cpu\",\"tbname\":\"cpu_usage\",\"fields\":[\"usage_guest\"]}" "]}"; typedef struct { -- GitLab