diff --git a/.drone.yml b/.drone.yml index 507f360..2492939 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,8 +17,8 @@ steps: - ./gradlew build packages shared:publishLibraryPublicationToGiteaRepository - for file in server/build/distributions/*.deb ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done - for file in server/build/distributions/*.rpm ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done - - for file in client/build/distributions/*.deb ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done - - for file in client/build/distributions/*.rpm ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done + - for file in agent/build/distributions/*.deb ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done + - for file in agent/build/distributions/*.rpm ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done - for file in plugins/build/distributions/*.deb ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done - for file in plugins/build/distributions/*.rpm ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done when: diff --git a/CHANGELOG.md b/CHANGELOG.md index b429f96..d23c2c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,11 @@ All notable changes to this project will be documented in this file. -## [1.1.9] - 2024-06-xx +## [1.2.1] - 2024-07-xx - Adjust defaults intervals from 10s to 30s -- Send sleep overrun +- Measure sleep overrun +- Rename client to agent + - When upgrading, ensure any *client* related init-scripts are removed ## [1.1.8] - 2024-05-14 - Update 3rd party dependencies diff --git a/README.md b/README.md index 7a0bc24..783f8d4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This software is free to use and is licensed under the [Apache 2.0 License](LICE Some of my other related projects are: - [hmci](https://github.com/mnellemann/hmci) for agent-less monitoring of IBM Power servers -- [svci](https://github.com/mnellemann/svci) for monitoring IBM Spectrum Virtualize (Flashsystems / Storwize / SVC) +- [svci](https://github.com/mnellemann/svci) for monitoring IBM Storage Virtualize (Flashsystems / Storwize / SVC) - [syslogd](https://github.com/mnellemann/syslogd) for redirecting syslog and GELF to other logging destinations ## Screenshots @@ -26,18 +26,18 @@ Screenshots of other dashboards are available in the [doc/screenshots](doc/scree ### Server -The server component receives aggregated metrics from *clients* and saves these into InfluxDB. +The server component receives aggregated metrics from *agents* and saves these into InfluxDB. - Downloaded server package from [releases](https://github.com/mnellemann/sysmon/releases). - More information and documentation on the [sysmon-server](server/README.md). -### Client & Plugins +### Agent & Plugins -The client runs on all or some of your hosts and collects metrics, which are then sent to the central sysmon-server component. Plugins are loaded by the client at startup and should also be installed. +The agent runs on all or some of your hosts and collects metrics, which are then sent to the central sysmon-server component. Plugins are loaded by the agent at startup and should also be installed. -- Downloaded client & plugin packages from [releases](https://github.com/mnellemann/sysmon/releases). -- More information and documentation on the [sysmon-client](client/README.md). -. More information and documentation on the [sysmon-plugins](plugins/README.md). +- Downloaded agent & plugin packages from [releases](https://github.com/mnellemann/sysmon/releases). +- More information and documentation on the [sysmon-agent](agent/README.md). +- More information and documentation on the [sysmon-plugins](plugins/README.md). ## Known problems diff --git a/agent/README.md b/agent/README.md new file mode 100644 index 0000000..1a0e0b2 --- /dev/null +++ b/agent/README.md @@ -0,0 +1,17 @@ +# Agent + +This is the monitoring agent sysmon, which you install (together with sysmon-plugins) on your hosts. + +## Installation + +Download *.deb* or *.rpm* packages for sysmon-agent *and* sysmon-plugins, and install. + +## Development + +### Build & Test + +Use the gradle build tool, which will download all required dependencies: + +```shell +./gradlew clean build +``` diff --git a/client/build.gradle b/agent/build.gradle similarity index 93% rename from client/build.gradle rename to agent/build.gradle index 03e2ab7..d55c535 100644 --- a/client/build.gradle +++ b/agent/build.gradle @@ -36,17 +36,17 @@ dependencies { } -def projectName = "sysmon-client" +def projectName = "sysmon-agent" application { // Define the main class for the application. - mainClass.set('sysmon.client.Application') - applicationDefaultJvmArgs = [ "-Xms64m", "-Xmx64m", "-XX:+ExitOnOutOfMemoryError", "-XX:+AlwaysPreTouch" ] + mainClass.set('sysmon.agent.Application') + applicationDefaultJvmArgs = [ "-Xms16m", "-Xmx64m", "-XX:+ExitOnOutOfMemoryError", "-XX:+AlwaysPreTouch" ] } run { systemProperty 'sysmon.pluginsDir', '../plugins/output/' - systemProperty 'sysmon.cfgFile', 'doc/sysmon-client.toml' + systemProperty 'sysmon.cfgFile', 'doc/sysmon-agent.toml' systemProperty 'sysmon.debug', '1' } @@ -82,7 +82,7 @@ ospackage { user = 'root' packager = "Mark Nellemann " - into '/opt/sysmon/client' + into '/opt/sysmon/agent' from(shadowJar.outputs.files) { into 'lib' diff --git a/client/doc/readme-aix.md b/agent/doc/readme-aix.md similarity index 51% rename from client/doc/readme-aix.md rename to agent/doc/readme-aix.md index 3caa73e..2d68d31 100644 --- a/client/doc/readme-aix.md +++ b/agent/doc/readme-aix.md @@ -4,16 +4,16 @@ Works on IBM Power VIO (Virtual IO) servers, as well as regular IBM Power AIX in ## Installation -We require Java 8, which should already be installed on AIX, or is available to install. +Requires Java 8 (or later), which should already be installed on AIX, or is available to install. The RPM packages are *"noarch"* Java bytecode, so we can use the **--ignoreos** option to install: ```shell -rpm -ivh --ignoreos sysmon-client-*.rpm sysmon-plugins-*.rpm +rpm -ivh --ignoreos sysmon-agent-*.rpm sysmon-plugins-*.rpm ``` ## Configuration -Edit **/etc/sysmon-client.toml** and modify the server URL. +Edit **/etc/sysmon-agent.toml** and modify the server URL. ## Upgrades @@ -23,8 +23,8 @@ To upgrade the packages: rpm -Uvh --ignoreos sysmon-*.rpm ``` -To restart sysmon-client process after upgrade: +To restart sysmon-agent process after upgrade: ```shell -/etc/rc.d/init.d/sysmon-client stop; /etc/rc.d/init.d/sysmon-client start +/etc/rc.d/init.d/sysmon-agent stop; /etc/rc.d/init.d/sysmon-agent start ``` diff --git a/client/doc/readme-linux.md b/agent/doc/readme-linux.md similarity index 65% rename from client/doc/readme-linux.md rename to agent/doc/readme-linux.md index 3b3181d..68e2491 100644 --- a/client/doc/readme-linux.md +++ b/agent/doc/readme-linux.md @@ -11,13 +11,13 @@ Java 8 (or later) runtime is required. ## Installation -[Download](https://github.com/mnellemann/sysmon/releases) the latest client and plugins rpm or deb files. +[Download](https://github.com/mnellemann/sysmon/releases) the latest agent and plugins rpm/deb packages. ### RedHat Linux ```shell sudo dnf install java-11-openjdk-headless -sudo rpm -ivh sysmon-client-*.noarch.rpm sysmon-plugins-*.rpm +sudo rpm -ivh sysmon-agent-*.noarch.rpm sysmon-plugins-*.rpm ``` Use *yum* if *dnf* is not available. @@ -26,18 +26,18 @@ Use *yum* if *dnf* is not available. ```shell sudo zypper install java-11-openjdk-headless -sudo zypper install sysmon-client-*.noarch.rpm sysmon-plugins-*.rpm +sudo zypper install sysmon-agent-*.noarch.rpm sysmon-plugins-*.rpm ``` ### Debian/Ubuntu Linux ```shell sudo apt install default-jre-headless -sudo dpkg -i sysmon-client-*.deb sysmon-plugins-*.deb +sudo dpkg -i sysmon-agent-*.deb sysmon-plugins-*.deb ``` ## Configuration -Edit **/etc/sysmon-client.toml** and modify the server URL. +Edit **/etc/sysmon-agent.toml** and modify the server URL. -Check logs for errors with: ```journalctl -u sysmon-client``` +Check logs for errors with: ```journalctl -u sysmon-agent``` diff --git a/client/doc/scripts/ExampleScript.groovy b/agent/doc/scripts/ExampleScript.groovy similarity index 100% rename from client/doc/scripts/ExampleScript.groovy rename to agent/doc/scripts/ExampleScript.groovy diff --git a/client/doc/scripts/README.md b/agent/doc/scripts/README.md similarity index 100% rename from client/doc/scripts/README.md rename to agent/doc/scripts/README.md diff --git a/client/doc/sysmon-client.service b/agent/doc/sysmon-agent.service similarity index 63% rename from client/doc/sysmon-client.service rename to agent/doc/sysmon-agent.service index c66ee86..b7b0574 100644 --- a/client/doc/sysmon-client.service +++ b/agent/doc/sysmon-agent.service @@ -1,12 +1,12 @@ [Unit] -Description=Sysmon Client +Description=Sysmon Agent [Service] #User=nobody #Group=nobody TimeoutSec=20 Restart=on-failure -ExecStart=/opt/sysmon/client/bin/client +ExecStart=/opt/sysmon/agent/bin/agent [Install] WantedBy=default.target diff --git a/client/doc/sysmon-client.sh b/agent/doc/sysmon-agent.sh similarity index 96% rename from client/doc/sysmon-client.sh rename to agent/doc/sysmon-agent.sh index a9833e4..197a11b 100644 --- a/client/doc/sysmon-client.sh +++ b/agent/doc/sysmon-agent.sh @@ -9,12 +9,12 @@ # Description: Enable service provided by daemon. ### END INIT INFO -dir="/opt/sysmon/client" -cmd="/opt/sysmon/client/bin/client" +dir="/opt/sysmon/agent" +cmd="/opt/sysmon/agent/bin/agent" args="" user="" -name="sysmon-client" +name="sysmon-agent" pid_file="/var/run/$name.pid" stdout_log="/var/log/$name.log" stderr_log="/var/log/$name.err" diff --git a/client/doc/sysmon-client.toml b/agent/doc/sysmon-agent.toml similarity index 97% rename from client/doc/sysmon-client.toml rename to agent/doc/sysmon-agent.toml index 2ea8247..8d704be 100644 --- a/client/doc/sysmon-client.toml +++ b/agent/doc/sysmon-agent.toml @@ -1,5 +1,5 @@ ### -### Sysmon Client +### Sysmon Agent ### ### Example configuration with some default values. ### diff --git a/client/scripts/install.sh b/agent/scripts/install.sh similarity index 78% rename from client/scripts/install.sh rename to agent/scripts/install.sh index e0b2f9c..7c5a2ff 100644 --- a/client/scripts/install.sh +++ b/agent/scripts/install.sh @@ -1,6 +1,10 @@ #!/bin/sh install_config() { + # Migrate from old (name) configuration file + test -f "/etc/sysmon-client.toml" && mv "/etc/sysmon-client.toml" "/etc/${service_name}.toml" + + # Install default configuration file test -f "/etc/${service_name}.toml" || cp "${config_source}" "/etc/${service_name}.toml" } @@ -24,8 +28,8 @@ install_sysv_linux() { install_sysv_aix() { test -f "/etc/rc.d/init.d/${service_name}" || cp "${sysv_source}" "/etc/rc.d/init.d/${service_name}" chmod 0755 "/etc/rc.d/init.d/${service_name}" - ln -sf /etc/rc.d/init.d/sysmon-client /etc/rc.d/rc2.d/Ssysmon-client - ln -sf /etc/rc.d/init.d/sysmon-client /etc/rc.d/rc2.d/Ksysmon-client + ln -sf /etc/rc.d/init.d/sysmon-agent /etc/rc.d/rc2.d/Ssysmon-agent + ln -sf /etc/rc.d/init.d/sysmon-agent /etc/rc.d/rc2.d/Ksysmon-agent } install_sysv() { diff --git a/client/scripts/remove.sh b/agent/scripts/remove.sh similarity index 90% rename from client/scripts/remove.sh rename to agent/scripts/remove.sh index a21d03c..6303388 100644 --- a/client/scripts/remove.sh +++ b/agent/scripts/remove.sh @@ -19,8 +19,8 @@ remove_sysv_linux() { remove_sysv_aix() { /etc/rc.d/init.d/${service_name} stop - rm -f /etc/rc.d/init.d/sysmon-client /etc/rc.d/rc2.d/Ksysmon-client - rm -f /etc/rc.d/rc2.d/Ssysmon-client + rm -f /etc/rc.d/init.d/sysmon-agent /etc/rc.d/rc2.d/Ksysmon-agent + rm -f /etc/rc.d/rc2.d/Ssysmon-agent } remove_sysv() { diff --git a/agent/scripts/shared.sh b/agent/scripts/shared.sh new file mode 100644 index 0000000..4292bf3 --- /dev/null +++ b/agent/scripts/shared.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +service_name="sysmon-agent" +sysv_source="/opt/sysmon/agent/doc/sysmon-agent.sh" +config_source="/opt/sysmon/agent/doc/sysmon-agent.toml" +systemd_source="/opt/sysmon/agent/doc/sysmon-agent.service" + diff --git a/client/src/main/java/sysmon/client/ClientRouteBuilder.java b/agent/src/main/java/sysmon/agent/AgentRouteBuilder.java similarity index 97% rename from client/src/main/java/sysmon/client/ClientRouteBuilder.java rename to agent/src/main/java/sysmon/agent/AgentRouteBuilder.java index 81f3f8e..1abc5ce 100644 --- a/client/src/main/java/sysmon/client/ClientRouteBuilder.java +++ b/agent/src/main/java/sysmon/agent/AgentRouteBuilder.java @@ -1,4 +1,4 @@ -package sysmon.client; +package sysmon.agent; import org.apache.camel.Exchange; import org.apache.camel.LoggingLevel; @@ -26,9 +26,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -public class ClientRouteBuilder extends RouteBuilder { +public class AgentRouteBuilder extends RouteBuilder { - private static final Logger log = LoggerFactory.getLogger(ClientRouteBuilder.class); + private static final Logger log = LoggerFactory.getLogger(AgentRouteBuilder.class); private final Set scriptFiles = new HashSet<>(); diff --git a/client/src/main/java/sysmon/client/Application.java b/agent/src/main/java/sysmon/agent/Application.java similarity index 91% rename from client/src/main/java/sysmon/client/Application.java rename to agent/src/main/java/sysmon/agent/Application.java index ff9f149..0ef8730 100644 --- a/client/src/main/java/sysmon/client/Application.java +++ b/agent/src/main/java/sysmon/agent/Application.java @@ -1,7 +1,7 @@ /* * This Java source file was generated by the Gradle 'init' task. */ -package sysmon.client; +package sysmon.agent; import org.apache.camel.main.Main; import org.slf4j.simple.SimpleLogger; @@ -12,10 +12,10 @@ import java.net.UnknownHostException; import java.util.concurrent.Callable; -@CommandLine.Command(name = "sysmon-client", mixinStandardHelpOptions = true) +@CommandLine.Command(name = "sysmon-agent", mixinStandardHelpOptions = true) public class Application implements Callable { - @CommandLine.Option(names = { "-c", "--conf" }, description = "Configuration file [default: '/etc/sysmon-client.toml'].", paramLabel = "", defaultValue = "/etc/sysmon-client.toml") + @CommandLine.Option(names = { "-c", "--conf" }, description = "Configuration file [default: '/etc/sysmon-agent.toml'].", paramLabel = "", defaultValue = "/etc/sysmon-agent.toml") private File configurationFile; @CommandLine.Option(names = { "-d", "--debug" }, description = "Enable debugging (default: ${DEFAULT_VALUE}).") @@ -84,7 +84,7 @@ public Integer call() { main.bind("pluginPath", pluginPath); main.bind("myServerUrl", configuration.getServer()); main.bind("myHostname", hostname); - main.configure().addRoutesBuilder(ClientRouteBuilder.class); + main.configure().addRoutesBuilder(AgentRouteBuilder.class); // now keep the application running until the JVM is terminated (ctrl + c or sigterm) try { diff --git a/client/src/main/java/sysmon/client/ComboAppender.java b/agent/src/main/java/sysmon/agent/ComboAppender.java similarity index 94% rename from client/src/main/java/sysmon/client/ComboAppender.java rename to agent/src/main/java/sysmon/agent/ComboAppender.java index 5cc5b92..a200b52 100644 --- a/client/src/main/java/sysmon/client/ComboAppender.java +++ b/agent/src/main/java/sysmon/agent/ComboAppender.java @@ -1,4 +1,4 @@ -package sysmon.client; +package sysmon.agent; import sysmon.shared.ComboResult; import sysmon.shared.MetricResult; diff --git a/client/src/main/java/sysmon/client/Configuration.java b/agent/src/main/java/sysmon/agent/Configuration.java similarity index 99% rename from client/src/main/java/sysmon/client/Configuration.java rename to agent/src/main/java/sysmon/agent/Configuration.java index 0e81fc9..28e424c 100644 --- a/client/src/main/java/sysmon/client/Configuration.java +++ b/agent/src/main/java/sysmon/agent/Configuration.java @@ -1,4 +1,4 @@ -package sysmon.client; +package sysmon.agent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/client/src/main/java/sysmon/client/ListOfResultsStrategy.java b/agent/src/main/java/sysmon/agent/ListOfResultsStrategy.java similarity index 94% rename from client/src/main/java/sysmon/client/ListOfResultsStrategy.java rename to agent/src/main/java/sysmon/agent/ListOfResultsStrategy.java index 542266d..3f2e5a8 100644 --- a/client/src/main/java/sysmon/client/ListOfResultsStrategy.java +++ b/agent/src/main/java/sysmon/agent/ListOfResultsStrategy.java @@ -1,4 +1,4 @@ -package sysmon.client; +package sysmon.agent; import org.apache.camel.Exchange; import org.apache.camel.processor.aggregate.AbstractListAggregationStrategy; diff --git a/client/src/main/java/sysmon/client/MetricEnrichProcessor.java b/agent/src/main/java/sysmon/agent/MetricEnrichProcessor.java similarity index 97% rename from client/src/main/java/sysmon/client/MetricEnrichProcessor.java rename to agent/src/main/java/sysmon/agent/MetricEnrichProcessor.java index a007cf6..bef78cb 100644 --- a/client/src/main/java/sysmon/client/MetricEnrichProcessor.java +++ b/agent/src/main/java/sysmon/agent/MetricEnrichProcessor.java @@ -1,4 +1,4 @@ -package sysmon.client; +package sysmon.agent; import org.apache.camel.Exchange; import org.apache.camel.Processor; diff --git a/client/src/main/java/sysmon/client/ScriptWrapper.java b/agent/src/main/java/sysmon/agent/ScriptWrapper.java similarity index 98% rename from client/src/main/java/sysmon/client/ScriptWrapper.java rename to agent/src/main/java/sysmon/agent/ScriptWrapper.java index 1ebf031..ec4cbd3 100644 --- a/client/src/main/java/sysmon/client/ScriptWrapper.java +++ b/agent/src/main/java/sysmon/agent/ScriptWrapper.java @@ -1,4 +1,4 @@ -package sysmon.client; +package sysmon.agent; import groovy.lang.GroovyClassLoader; import groovy.lang.GroovyObject; diff --git a/client/src/main/resources/application.properties b/agent/src/main/resources/application.properties similarity index 97% rename from client/src/main/resources/application.properties rename to agent/src/main/resources/application.properties index 39b204a..125da34 100644 --- a/client/src/main/resources/application.properties +++ b/agent/src/main/resources/application.properties @@ -15,7 +15,7 @@ ## limitations under the License. ## --------------------------------------------------------------------------- -camel.main.name = sysmon-client +camel.main.name = agent camel.main.jmxEnabled = false camel.main.lightweight = true camel.component.seda.queue-size = 100 diff --git a/client/src/main/resources/simplelogger.properties b/agent/src/main/resources/simplelogger.properties similarity index 100% rename from client/src/main/resources/simplelogger.properties rename to agent/src/main/resources/simplelogger.properties diff --git a/client/src/test/groovy/sysmon/client/AppTest.groovy b/agent/src/test/groovy/sysmon/agent/AppTest.groovy similarity index 77% rename from client/src/test/groovy/sysmon/client/AppTest.groovy rename to agent/src/test/groovy/sysmon/agent/AppTest.groovy index 3652b6a..4f7d4aa 100644 --- a/client/src/test/groovy/sysmon/client/AppTest.groovy +++ b/agent/src/test/groovy/sysmon/agent/AppTest.groovy @@ -1,4 +1,4 @@ -package sysmon.client +package sysmon.agent import spock.lang.Specification diff --git a/client/src/test/resources/simplelogger.properties b/agent/src/test/resources/simplelogger.properties similarity index 100% rename from client/src/test/resources/simplelogger.properties rename to agent/src/test/resources/simplelogger.properties diff --git a/build.gradle b/build.gradle index 323077c..500240a 100644 --- a/build.gradle +++ b/build.gradle @@ -37,8 +37,8 @@ subprojects { tasks.register("packages") { group "build" - dependsOn ":client:buildDeb" - dependsOn ":client:buildRpm" + dependsOn ":agent:buildDeb" + dependsOn ":agent:buildRpm" dependsOn ":server:buildDeb" dependsOn ":server:buildRpm" diff --git a/client/README.md b/client/README.md deleted file mode 100644 index d24f68e..0000000 --- a/client/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Client / Agent - -This is the client/agent component of sysmon, which you install (together with sysmon-plugins) on your hosts. - -## Installation - -Download *.deb* or *.rpm* packages for sysmon-client *and* sysmon-plugins, and install. - -## Development - -### Build & Test - -Use the gradle build tool, which will download all required dependencies: - -```shell -./gradlew clean build -``` diff --git a/client/scripts/shared.sh b/client/scripts/shared.sh deleted file mode 100644 index 0344041..0000000 --- a/client/scripts/shared.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -service_name="sysmon-client" -sysv_source="/opt/sysmon/client/doc/sysmon-client.sh" -config_source="/opt/sysmon/client/doc/sysmon-client.toml" -systemd_source="/opt/sysmon/client/doc/sysmon-client.service" - diff --git a/gradle.properties b/gradle.properties index daa014e..038b0d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ -version = 1.1.8 +version = 1.2.1 pf4jVersion = 3.11.1 slf4jVersion = 2.0.12 camelVersion = 3.14.10 -groovyVersion = 3.0.21 +groovyVersion = 3.0.22 picocliVersion = 4.7.6 oshiVersion = 6.6.1 spockVersion = 2.3-groovy-3.0 diff --git a/plugins/base/src/main/java/sysmon/plugins/base/BaseLatencyExtension.java b/plugins/base/src/main/java/sysmon/plugins/base/BaseLatencyExtension.java index 85b62e1..9fcf6ab 100644 --- a/plugins/base/src/main/java/sysmon/plugins/base/BaseLatencyExtension.java +++ b/plugins/base/src/main/java/sysmon/plugins/base/BaseLatencyExtension.java @@ -76,7 +76,7 @@ public void setConfiguration(Map map) { @Override public MetricResult getMetrics() { - // TODO: Calculate execution time for sysmon-client to monitor drift + // TODO: Calculate execution time for sysmon-agent to monitor drift // Available from Java 9 //long pid = ProcessHandle.current().pid(); @@ -88,7 +88,7 @@ public MetricResult getMetrics() { long nanoTime2 = System.nanoTime(); long nanoDiff = nanoTime2 - nanoTime1; sleepOverrun = (nanoDiff / 1_000_000) - sleepTimeMillis; - log.warn("Sleep Overrun: {}", sleepOverrun); + log.debug("getMetrics() - sleep Overrun: {}", sleepOverrun); } catch (InterruptedException e) { log.error("getMetrics() - error: {}", e.getMessage()); } diff --git a/plugins/build.gradle b/plugins/build.gradle index c207c3a..f6694f1 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -100,12 +100,12 @@ ospackage { buildDeb { subprojects.each { dependsOn("${it.name}:build") } - requires('sysmon-client', version, GREATER | EQUAL) + requires('sysmon-agent', version, GREATER | EQUAL) } buildRpm { subprojects.each { dependsOn("${it.name}:build") } - requires('sysmon-client', version, GREATER | EQUAL) + requires('sysmon-agent', version, GREATER | EQUAL) os Os.LINUX } diff --git a/server/doc/readme-aix.md b/server/doc/readme-aix.md index e5cf736..dc0a87e 100644 --- a/server/doc/readme-aix.md +++ b/server/doc/readme-aix.md @@ -2,7 +2,7 @@ ## Installation -We require Java 8, which should already be installed on AIX, or can be downloaded and installed. +Requires Java 8 (or later), which should already be installed on AIX, or can be downloaded and installed. The RPM packages are *"noarch"* Java bytecode, so we can use the **--ignoreos** option to install: ```shell diff --git a/server/scripts/install.sh b/server/scripts/install.sh index eb5a817..40fcc6b 100644 --- a/server/scripts/install.sh +++ b/server/scripts/install.sh @@ -24,9 +24,8 @@ install_sysv_linux() { install_sysv_aix() { test -f "/etc/rc.d/init.d/${service_name}" || cp "${sysv_source}" "/etc/rc.d/init.d/${service_name}" chmod 0755 "/etc/rc.d/init.d/${service_name}" - ln -sf /etc/rc.d/init.d/sysmon-client /etc/rc.d/rc2.d/Ssysmon-client - ln -sf /etc/rc.d/init.d/sysmon-client /etc/rc.d/rc2.d/Ksysmon-client - echo "Edit /etc/rc.d/init.d/${service_name} and modify server URL and other options" + ln -sf /etc/rc.d/init.d/sysmon-server /etc/rc.d/rc2.d/Ssysmon-server + ln -sf /etc/rc.d/init.d/sysmon-server /etc/rc.d/rc2.d/Ksysmon-server } install_sysv() { diff --git a/server/scripts/remove.sh b/server/scripts/remove.sh index 9aa0340..fb2d42c 100644 --- a/server/scripts/remove.sh +++ b/server/scripts/remove.sh @@ -19,8 +19,8 @@ remove_sysv_linux() { remove_sysv_aix() { /etc/rc.d/init.d/${service_name} stop - rm -f /etc/rc.d/init.d/sysmon-client /etc/rc.d/rc2.d/Ksysmon-client - rm -f /etc/rc.d/rc2.d/Ssysmon-client + rm -f /etc/rc.d/init.d/sysmon-server /etc/rc.d/rc2.d/Ksysmon-server + rm -f /etc/rc.d/rc2.d/Ssysmon-server } remove_sysv() { diff --git a/server/src/main/resources/application.properties b/server/src/main/resources/application.properties index fa39ff4..0e2ce1d 100644 --- a/server/src/main/resources/application.properties +++ b/server/src/main/resources/application.properties @@ -15,5 +15,5 @@ ## limitations under the License. ## --------------------------------------------------------------------------- -camel.main.name = sysmon-server +camel.main.name = server camel.main.lightweight = true diff --git a/settings.gradle b/settings.gradle index 3d2a33d..b4115f4 100644 --- a/settings.gradle +++ b/settings.gradle @@ -8,7 +8,7 @@ */ rootProject.name = 'sysmon' -include('shared', 'client', 'server', 'plugins') +include('shared', 'agent', 'server', 'plugins') new File(rootDir, "plugins").listFiles().each {