Compare commits
15 Commits
Author | SHA1 | Date |
---|---|---|
Mark Nellemann | 5204142cb4 | |
Mark Nellemann | 80066b0c2e | |
Mark Nellemann | 462822b7e5 | |
Mark Nellemann | 6e05b5bb65 | |
Mark Nellemann | c358e281ea | |
Mark Nellemann | 3096ae450e | |
Mark Nellemann | 55848ee590 | |
Mark Nellemann | a5e3b4afcd | |
Mark Nellemann | 27838ab6ec | |
Mark Nellemann | 7b9d27a124 | |
Mark Nellemann | 91c604e765 | |
Mark Nellemann | 25e2f58264 | |
Mark Nellemann | 11a22e84ba | |
Mark Nellemann | fb94b9e563 | |
Mark Nellemann | 43d3e9babf |
|
@ -2,6 +2,9 @@
|
|||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.1.2] - 2023-02-06
|
||||
- Lowercase client hostnames
|
||||
|
||||
## [1.1.1] - 2023-01-22
|
||||
- Simplify plugin naming
|
||||
- Initial support for executing (groovy) scripts
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# System Monitor
|
||||
|
||||
Open source system monitoring solution with support for plugins.
|
||||
Open source system monitoring solution with support for plugins and scripts.
|
||||
|
||||
This software is free to use and is licensed under the [Apache 2.0 License](LICENSE).
|
||||
|
||||
|
@ -15,6 +15,13 @@ Some of my other related projects are:
|
|||
- [svci](https://git.data.coop/nellemann/svci) for monitoring IBM Spectrum Virtualize (Flashsystems / Storwize / SVC)
|
||||
- [syslogd](https://git.data.coop/nellemann/syslogd) for redirecting syslog and GELF to other logging destinations
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
||||
![screenshot](doc/screenshots/sysmon1.png)
|
||||
|
||||
Screenshots of other dashboards are available in the [doc/screenshots](doc/screenshots/) folder.
|
||||
|
||||
## Components
|
||||
|
||||
### Server
|
||||
|
|
|
@ -45,4 +45,5 @@ tasks.register("packages") {
|
|||
|
||||
dependsOn ":plugins:buildDeb"
|
||||
dependsOn ":plugins:buildRpm"
|
||||
dependsOn ":plugins:buildZip"
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ plugins {
|
|||
|
||||
id "net.nemerosa.versioning" version "2.15.1"
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
id "com.netflix.nebula.ospackage" version "10.0.0"
|
||||
id "com.netflix.nebula.ospackage" version "11.3.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -8,7 +8,7 @@ We require Java 8, which should already be installed on AIX, or is available to
|
|||
The RPM packages are *"noarch"* Java bytecode, so we can use the **--ignoreos** option to install:
|
||||
|
||||
```shell
|
||||
rpm -i --ignoreos sysmon-client.rpm sysmon-plugins.rpm
|
||||
rpm -ivh --ignoreos sysmon-client-*.rpm sysmon-plugins-*.rpm
|
||||
```
|
||||
|
||||
### Run automatically at boot
|
||||
|
|
|
@ -19,11 +19,12 @@ pid_file="/var/run/$name.pid"
|
|||
stdout_log="/var/log/$name.log"
|
||||
stderr_log="/var/log/$name.err"
|
||||
|
||||
# Uncomment if required
|
||||
# Java 8+ runtime required - Uncomment and export JAVA_HOME if needed
|
||||
#JAVA_HOME=/usr/java8_64
|
||||
#JAVA_HOME=/opt/ibm-semeru-open-8-jdk
|
||||
#JAVA_HOME=/opt/ibm-semeru-open-11-jdk
|
||||
#JAVA_HOME=/opt/ibm-semeru-open-17-jdk
|
||||
#JAVA_HOME=/opt/ibm-semeru-open-XX-jre
|
||||
#JAVA_HOME=/opt/ibm-semeru-open-XX-jdk
|
||||
#JAVA_HOME=/opt/ibm/ibm-semeru-certified-XX-jre
|
||||
#JAVA_HOME=/opt/ibm/ibm-semeru-certified-XX-jdk
|
||||
#export JAVA_HOME
|
||||
|
||||
get_pid() {
|
||||
|
|
|
@ -32,4 +32,4 @@ public class MetricEnrichProcessor implements Processor {
|
|||
exchange.getIn().setBody(metricResult);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
},
|
||||
"id": 28,
|
||||
"options": {
|
||||
"content": "## Metrics are collected by an agent running inside of each LPAR / VM / Host.\n \n For more information: [git.data.coop/nellemann/sysmon](https://git.data.coop/nellemann/sysmon)\n ",
|
||||
"content": "## Metrics are collected by an agent running inside of each LPAR / VM / Host.\n \n For more information visit: [git.data.coop/nellemann/sysmon](https://git.data.coop/nellemann/sysmon)\n ",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.1.6",
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
},
|
||||
"id": 28,
|
||||
"options": {
|
||||
"content": "## Metrics are collected by an agent running inside of each LPAR / VM / Host.\n \n For more information: [git.data.coop/nellemann/sysmon](https://git.data.coop/nellemann/sysmon)\n ",
|
||||
"content": "## Metrics are collected by an agent running inside of each LPAR / VM / Host.\n \n For more information visit: [git.data.coop/nellemann/sysmon](https://git.data.coop/nellemann/sysmon)\n ",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.1.6",
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
},
|
||||
"id": 30,
|
||||
"options": {
|
||||
"content": "## Metrics are collected by an agent running inside of each LPAR / VM / Host.\n \n For more information: [git.data.coop/nellemann/sysmon](https://git.data.coop/nellemann/sysmon)\n ",
|
||||
"content": "## Metrics are collected by an agent running inside of each LPAR / VM / Host.\n \n For more information visit: [git.data.coop/nellemann/sysmon](https://git.data.coop/nellemann/sysmon)\n ",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.1.6",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
version = 1.1.1
|
||||
pf4jVersion = 3.7.0
|
||||
slf4jVersion = 2.0.6
|
||||
camelVersion = 3.14.7
|
||||
groovyVersion = 3.0.14
|
||||
picocliVersion = 4.7.0
|
||||
oshiVersion = 6.4.0
|
||||
version = 1.1.4
|
||||
pf4jVersion = 3.9.0
|
||||
slf4jVersion = 2.0.9
|
||||
camelVersion = 3.14.9
|
||||
groovyVersion = 3.0.18
|
||||
picocliVersion = 4.7.5
|
||||
oshiVersion = 6.4.7
|
||||
spockVersion = 2.3-groovy-3.0
|
||||
tomljVersion = 1.1.0
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
@ -80,10 +80,10 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
@ -143,12 +143,16 @@ fi
|
|||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
|
|
|
@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
|
|||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class BaseDiskExtension implements MetricExtension {
|
|||
|
||||
ArrayList<Measurement> measurementList = new ArrayList<>();
|
||||
if(diskStores == null || refreshCounter++ > 360) {
|
||||
log.info("getMetrics() - refreshing list of disk stores");
|
||||
log.debug("getMetrics() - refreshing list of disk stores");
|
||||
diskStores = hardwareAbstractionLayer.getDiskStores();
|
||||
refreshCounter = 0;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import org.pf4j.Extension;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import oshi.SystemInfo;
|
||||
import oshi.hardware.HardwareAbstractionLayer;
|
||||
import oshi.software.os.OSFileStore;
|
||||
import sysmon.shared.Measurement;
|
||||
import sysmon.shared.MetricExtension;
|
||||
|
|
|
@ -84,7 +84,6 @@ public class BaseInfoExtension implements MetricExtension {
|
|||
put("boot_time", systemInfo.getOperatingSystem().getSystemBootTime());
|
||||
}};
|
||||
|
||||
log.info(fieldsMap.toString());
|
||||
return new MetricResult(name, new Measurement(tags, fieldsMap));
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class BaseNetworkExtension implements MetricExtension {
|
|||
|
||||
ArrayList<Measurement> measurementList = new ArrayList<>();
|
||||
if(interfaces == null || refreshCounter++ > 360) {
|
||||
log.info("getMetrics() - refreshing list of network interfaces");
|
||||
log.debug("getMetrics() - refreshing list of network interfaces");
|
||||
interfaces = hardwareAbstractionLayer.getNetworkIFs();
|
||||
refreshCounter = 0;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package sysmon.plugins.base;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.pf4j.Plugin;
|
||||
import org.pf4j.PluginWrapper;
|
||||
import oshi.SystemInfo;
|
||||
import oshi.hardware.HardwareAbstractionLayer;
|
||||
|
||||
|
@ -15,9 +14,6 @@ public class BasePlugin extends Plugin {
|
|||
private static SystemInfo systemInfo;
|
||||
private static HardwareAbstractionLayer hardwareAbstractionLayer;
|
||||
|
||||
public BasePlugin(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
}
|
||||
|
||||
public static HardwareAbstractionLayer getHardwareAbstractionLayer() {
|
||||
|
||||
|
|
|
@ -38,10 +38,13 @@ public class BaseProcessExtension implements MetricExtension {
|
|||
add("corosync");
|
||||
add("rsyslogd");
|
||||
add("postgres");
|
||||
add("mariadbd");
|
||||
add("memcached");
|
||||
add("db2sysc");
|
||||
add("dsmserv");
|
||||
add("mmfsd");
|
||||
add("systemd");
|
||||
add("nginx");
|
||||
}};
|
||||
|
||||
private final long minUptimeInSeconds = 600;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import org.redline_rpm.header.Os
|
||||
|
||||
plugins {
|
||||
id "com.netflix.nebula.ospackage" version "10.0.0"
|
||||
id "com.netflix.nebula.ospackage" version "11.3.0"
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,3 +110,12 @@ task buildRpmAix(type: Rpm) {
|
|||
packageName = "${projectName}-AIX"
|
||||
os = Os.AIX
|
||||
}
|
||||
|
||||
task buildZip(type: Zip) {
|
||||
subprojects.each {
|
||||
dependsOn("${it.name}:copyJar")
|
||||
}
|
||||
from "output"
|
||||
setArchivesBaseName(projectName as String)
|
||||
setArchiveVersion(project.property("version") as String)
|
||||
}
|
||||
|
|
|
@ -1,18 +1,7 @@
|
|||
package sysmon.plugins.power;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.pf4j.Plugin;
|
||||
import org.pf4j.PluginWrapper;
|
||||
|
||||
public class PowerPlugin extends Plugin {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(PowerPlugin.class);
|
||||
|
||||
public PowerPlugin(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ plugins {
|
|||
|
||||
id "net.nemerosa.versioning" version "2.15.1"
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
id "com.netflix.nebula.ospackage" version "10.0.0"
|
||||
id "com.netflix.nebula.ospackage" version "11.3.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -46,7 +46,7 @@ public class MetricResult implements Serializable {
|
|||
}
|
||||
|
||||
public void setHostname(String hostname) {
|
||||
this.hostname = hostname;
|
||||
this.hostname = hostname.toLowerCase();
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
|
|
Loading…
Reference in New Issue