From d005f246573e79aa04ebe018d2298308051f942a Mon Sep 17 00:00:00 2001 From: Dmitry Kochetov Date: Tue, 9 Apr 2024 17:23:27 +0300 Subject: [PATCH] disabled config reloading --- config/config.go | 2 +- current_version_agent | 2 +- install.sh | 4 ++-- metrics/runner.go | 12 ------------ mysqlconfigurer.sh | 4 ++-- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/config/config.go b/config/config.go index 337fac6..3eb5798 100644 --- a/config/config.go +++ b/config/config.go @@ -9,7 +9,7 @@ import ( ) const ( - ReleemAgentVersion = "1.14.1" + ReleemAgentVersion = "1.14.1.1" ) type Config struct { diff --git a/current_version_agent b/current_version_agent index 30f101c..1fe8c4a 100644 --- a/current_version_agent +++ b/current_version_agent @@ -1 +1 @@ -1.14.1 \ No newline at end of file +1.14.1.1 \ No newline at end of file diff --git a/install.sh b/install.sh index 1e3c024..9bd49f9 100644 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ #!/bin/bash -# install.sh - Version 1.14.1 +# install.sh - Version 1.14.1.1 # (C) Releem, Inc 2022 # All rights reserved @@ -7,7 +7,7 @@ # using the package manager. set -e -install_script_version=1.14.1 +install_script_version=1.14.1.1 logfile="releem-install.log" WORKDIR="/opt/releem" diff --git a/metrics/runner.go b/metrics/runner.go index 0623bfa..2c037ee 100644 --- a/metrics/runner.go +++ b/metrics/runner.go @@ -36,14 +36,12 @@ func RunWorker(gatherers []MetricsGatherer, gatherers_configuration []MetricsGat } logger.Debug(configuration) - configTimer := time.NewTimer(configuration.ReadConfigSeconds * time.Second) if (Mode.Name == "Configurations" && Mode.ModeType != "default") || Mode.Name == "Events" || Mode.Name == "Task" { GenerateTimer = time.NewTimer(0 * time.Second) timer = time.NewTimer(3600 * time.Second) } else { GenerateTimer = time.NewTimer(configuration.GenerateConfigSeconds * time.Second) timer = time.NewTimer(1 * time.Second) - } terminator := makeTerminateChannel() @@ -53,7 +51,6 @@ func RunWorker(gatherers []MetricsGatherer, gatherers_configuration []MetricsGat logger.Info("Exiting") os.Exit(0) case <-timer.C: - timer.Reset(configuration.TimePeriodSeconds * time.Second) go func() { defer HandlePanic(configuration, logger) @@ -68,15 +65,6 @@ func RunWorker(gatherers []MetricsGatherer, gatherers_configuration []MetricsGat } } }() - case <-configTimer.C: - configTimer.Reset(configuration.ReadConfigSeconds * time.Second) - if newConfig, err := config.LoadConfig(configFile, logger); err != nil { - logger.PrintError("Error reading config", err) - } else { - configuration = newConfig - logger.Debug("LOADED NEW CONFIG", "APIKEY", configuration.GetApiKey()) - } - case <-GenerateTimer.C: GenerateTimer.Reset(configuration.GenerateConfigSeconds * time.Second) go func() { diff --git a/mysqlconfigurer.sh b/mysqlconfigurer.sh index e5d122c..6645383 100755 --- a/mysqlconfigurer.sh +++ b/mysqlconfigurer.sh @@ -1,5 +1,5 @@ #!/bin/bash -# mysqlconfigurer.sh - Version 1.14.1 +# mysqlconfigurer.sh - Version 1.14.1.1 # (C) Releem, Inc 2022 # All rights reserved @@ -12,7 +12,7 @@ MYSQLTUNER_REPORT=$MYSQLCONFIGURER_PATH"mysqltunerreport.json" RELEEM_MYSQL_VERSION=$MYSQLCONFIGURER_PATH"mysql_version" MYSQLCONFIGURER_CONFIGFILE="${MYSQLCONFIGURER_PATH}${MYSQLCONFIGURER_FILE_NAME}" MYSQL_MEMORY_LIMIT=0 -VERSION="1.14.1" +VERSION="1.14.1.1" RELEEM_INSTALL_PATH=$MYSQLCONFIGURER_PATH"install.sh" logfile="releem-mysqlconfigurer.log"