From e28c79b200679cdc4e34bc865a8eaef9170ac7dd Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 1 Nov 2022 19:10:24 +0800 Subject: [PATCH] disable audit by default --- packaging/cfg/taos.cfg | 4 ++-- src/common/src/tglobal.c | 2 +- src/plugins/monitor/src/monMain.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 9b07ed7ab3..197ee5d297 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -192,7 +192,7 @@ keepColumnName 1 # monitor 1 # enable/disable system audit -# audit 1 +# audit 0 # enable/disable recording the SQL statements via restful interface # httpEnableRecordSql 0 @@ -321,4 +321,4 @@ keepColumnName 1 # writeBatchTimeout 10 # using thread local write batching. this option is not available when writeBatchSize = 0. -# writeBatchThreadLocal 0 \ No newline at end of file +# writeBatchThreadLocal 0 diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index 30711dfd39..e49ed4caa5 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -206,7 +206,7 @@ char tsInternalPass[] = "secretkey"; int32_t tsMonitorInterval = 30; // seconds // audit -int8_t tsEnableAudit = 1; +int8_t tsEnableAudit = 0; char tsAuditDbName[TSDB_DB_NAME_LEN] = "audit"; // stream diff --git a/src/plugins/monitor/src/monMain.c b/src/plugins/monitor/src/monMain.c index 6306e84144..f92abc3cf1 100644 --- a/src/plugins/monitor/src/monMain.c +++ b/src/plugins/monitor/src/monMain.c @@ -281,7 +281,7 @@ static void *monAuditFunc(void *param) { int32_t try = 0; for (; try < AUDIT_MAX_RETRIES; ++try) { - auditConn = taos_connect(NULL, "root", "taosdata", "", 0); + auditConn = taos_connect(NULL, "monitor", tsInternalPass, "", 0); if (auditConn == NULL) { monDebug("audit retry connect, tries: %d", try); taosMsleep(1000); -- GitLab