Compare commits

...

22 Commits
v1.1.0 ... main

Author SHA1 Message Date
Mark Nellemann bb6a5f47c6 Update README.md 2024-05-17 06:19:16 +00:00
Mark Nellemann 5204142cb4 Remove ansible example
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
2023-11-02 20:03:01 +01:00
Mark Nellemann 80066b0c2e Update dependencies and bump version. 2023-11-02 09:40:47 +01:00
Mark Nellemann 462822b7e5 Merge pull request 'updates' (#3) from updates into main
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
Reviewed-on: #3
2023-08-13 16:56:51 +00:00
Mark Nellemann 6e05b5bb65 Update 3rd party build dependencies.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-08-13 18:54:47 +02:00
Mark Nellemann c358e281ea Merge branch 'main' of git.data.coop:nellemann/sysmon 2023-08-13 18:15:51 +02:00
Mark Nellemann 3096ae450e Make a zip archive of plugins.
continuous-integration/drone/push Build is passing Details
2023-06-24 21:32:37 +02:00
Mark Nellemann 55848ee590 Update 3rd party build dependencies.
continuous-integration/drone/push Build is passing Details
2023-06-07 07:48:58 +02:00
Mark Nellemann a5e3b4afcd Merge pull request 'Just minor changes to build deps.' (#1) from power into main
Reviewed-on: #1
2023-05-10 09:04:25 +00:00
Mark Nellemann 27838ab6ec Update 3rd party build dependencies. 2023-05-10 11:02:22 +02:00
Mark Nellemann 7b9d27a124 Changes to reflect updated deps.
continuous-integration/drone/push Build is passing Details
2023-03-15 17:27:37 +01:00
Mark Nellemann 91c604e765 Merge branch 'main' into power
continuous-integration/drone/push Build is passing Details
2023-03-15 16:29:48 +01:00
Mark Nellemann 25e2f58264 Update dependencies.
continuous-integration/drone/push Build is passing Details
2023-03-15 16:28:50 +01:00
Mark Nellemann 11a22e84ba Initial work on power readings.
continuous-integration/drone/push Build is passing Details
2023-03-15 16:21:07 +01:00
Mark Nellemann fb94b9e563 Add ansible example
continuous-integration/drone/push Build is passing Details
2023-02-09 16:21:29 +01:00
Mark Nellemann 43d3e9babf Lowercase client hostnames, housekeeping, update dashboards.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
2023-02-06 19:47:36 +01:00
Mark Nellemann d48934b94c Update dashboards to reflect Power/AIX plugin rename and fix urls.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
2023-01-22 11:20:58 +01:00
Mark Nellemann 7ca1714198 Update dashboards to reflect Power/AIX plugin rename and fix urls.
continuous-integration/drone/push Build is passing Details
2023-01-22 11:19:42 +01:00
Mark Nellemann 186d678861 Set ID of routes and fix bug when no configuration file is found.
continuous-integration/drone/push Build is passing Details
2023-01-22 11:07:15 +01:00
Mark Nellemann ebd058a433 Update links.
continuous-integration/drone/push Build is passing Details
2023-01-18 15:50:09 +01:00
Mark Nellemann e0a6499daa Update links and provide screenshots
continuous-integration/drone/push Build is passing Details
2023-01-06 08:15:37 +01:00
Mark Nellemann f2d325425a Update links and provide screenshots. 2023-01-06 08:15:18 +01:00
34 changed files with 117 additions and 154 deletions

View File

@ -2,9 +2,14 @@
All notable changes to this project will be documented in this file.
## [1.1.1] - 2023-01-xx
## [1.1.2] - 2023-02-06
- Lowercase client hostnames
## [1.1.1] - 2023-01-22
- Simplify plugin naming
- Initial support for calling (groovy) scripts
- Initial support for executing (groovy) scripts
- Fixed bug when no config file were found
- Update the default [dashboards](doc/dashboards/)
## [1.1.0] - 2022-12-17
- Lower influx time precision from milliseconds to seconds
@ -50,6 +55,7 @@ All notable changes to this project will be documented in this file.
### Changed
- Updated 3rd party dependencies.
<!--
[1.1.0]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v1.1.0%0Dv0.1.24
[1.0.24]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v1.0.24%0Dv0.1.23
[1.0.23]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v1.0.23%0Dv0.1.21
@ -59,3 +65,4 @@ All notable changes to this project will be documented in this file.
[0.1.11]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v0.1.11%0Dv0.1.10
[0.1.10]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v0.1.10%0Dv0.1.9
[0.1.9]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v0.1.9%0Dv0.1.8
-->

View File

@ -1,54 +1,3 @@
# System Monitor
# Repository moved
Open source system monitoring solution with support for plugins.
This software is free to use and is licensed under the [Apache 2.0 License](LICENSE).
- Example dashboards are provided in the [doc/dashboards/](doc/dashboards/) folder, which can be imported into your Grafana installation.
- Screenshots are available in the [downloads](https://bitbucket.org/mnellemann/sysmon/downloads/) section.
![Sysmon Icon](doc/sysmon.png)
Some of my other related projects are:
- [hmci](https://bitbucket.org/mnellemann/hmci) for agent-less monitoring of IBM Power servers
- [svci](https://bitbucket.org/mnellemann/svci) for monitoring IBM Spectrum Virtualize (Flashsystems / Storwize / SVC)
- [syslogd](https://bitbucket.org/mnellemann/syslogd) for redirecting syslog and GELF to other logging destinations
## Components
This software consist of a server and client component.
### Server
The server component receives aggregated metrics from *clients* and saves these into InfluxDB.
- More information and documentation on the [sysmon-server](server/README.md).
### Client & 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.
- More information and documentation on the [sysmon-client](client/README.md).
. More information and documentation on the [sysmon-plugins](plugins/README.md).
## Known problems
### Correct timezone and clock
- Ensure you have **correct timezone and date/time** and NTPd (or similar) running to keep it accurate!
### Naming collision
You can't have hosts with the same name, as these cannot be distinguished when metrics are
written to InfluxDB (which uses the hostname as key).
### Renaming hosts
If you rename a host, the metrics in InfluxDB will still be available by the old hostname, and new metrics will be written with the new hostname. There is no easy way to migrate the old data, but you can delete it easily:
```text
USE sysmon;
DELETE WHERE hostname = 'unknown';
```
Please visit [github.com/mnellemann/sysmon](https://github.com/mnellemann/sysmon)

View File

@ -45,4 +45,5 @@ tasks.register("packages") {
dependsOn ":plugins:buildDeb"
dependsOn ":plugins:buildRpm"
dependsOn ":plugins:buildZip"
}

View File

@ -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 {

View File

@ -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

View File

@ -18,11 +18,9 @@ Use *yum* if *dnf* is not available.
## Installation
[Download](https://bitbucket.org/mnellemann/sysmon/downloads/) the latest client and plugins rpm files and install:
[Download](https://git.data.coop/nellemann/-/packages/generic/sysmon/) the latest client and plugins rpm files and install:
```shell
wget https://bitbucket.org/mnellemann/sysmon/downloads/sysmon-client-1.0.16-1.noarch.rpm
wget https://bitbucket.org/mnellemann/sysmon/downloads/sysmon-plugins-1.0.16-1.noarch.rpm
rpm -ivh sysmon-client-*.noarch.rpm sysmon-plugins-*.noarch.rpm
cp /opt/sysmon/client/doc/sysmon-client.service /etc/systemd/system/
systemctl daemon-reload

View File

@ -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() {

View File

@ -85,7 +85,7 @@ public class Application implements Callable<Integer> {
try {
configuration.parse(configurationFile.toPath());
} catch (Exception e) {
System.err.println(e.getMessage());
System.err.println("Could not parse configuration file: " + e.getMessage());
return 1;
}
}

View File

@ -62,6 +62,7 @@ public class ClientRouteBuilder extends RouteBuilder {
}
from("seda:metrics?purgeWhenStopping=true")
.routeId("aggregation")
.aggregate(constant(true), AggregationStrategies.beanAllowNull(ComboAppender.class, "append"))
.completionTimeout(5000L)
.doTry()
@ -72,6 +73,7 @@ public class ClientRouteBuilder extends RouteBuilder {
.end();
from("seda:outbound?purgeWhenStopping=true")
.routeId("outbound")
.setHeader(Exchange.HTTP_METHOD, constant("POST"))
.doTry()
.marshal(new JacksonDataFormat(ComboResult.class))
@ -108,6 +110,7 @@ public class ClientRouteBuilder extends RouteBuilder {
Registry registry = getContext().getRegistry();
from("timer:scripts?fixedRate=true&period=30s")
.routeId(script.toString())
.bean(script, "run")
.outputType(MetricResult.class)
.process(new MetricEnrichProcessor(registry))
@ -129,6 +132,7 @@ public class ClientRouteBuilder extends RouteBuilder {
String timerName = ext.isThreaded() ? ext.getName() : "default";
String timerInterval = (ext.getInterval() != null) ? ext.getInterval() : "30s";
from("timer:" + timerName + "?fixedRate=true&period=" + timerInterval)
.routeId(ext.getName())
.bean(ext, "getMetrics")
.outputType(MetricResult.class)
.process(new MetricEnrichProcessor(registry))

View File

@ -67,6 +67,10 @@ public final class Configuration {
String getScriptPath() {
if(result == null) {
log.debug("No configuration file loaded ...");
return null;
}
return result.getString("scripts");
}

View File

@ -32,4 +32,4 @@ public class MetricEnrichProcessor implements Processor {
exchange.getIn().setBody(metricResult);
}
}
}

View File

@ -18,8 +18,10 @@ public class ScriptWrapper {
private final static GroovyClassLoader loader = new GroovyClassLoader();
private GroovyObject script;
private final String name;
public ScriptWrapper(String scriptPath, String scriptFile) {
name = scriptFile;
try {
Class<?> scriptClass = loader.parseClass(new File(scriptPath, scriptFile));
script = (GroovyObject) scriptClass.getDeclaredConstructor().newInstance();
@ -37,5 +39,9 @@ public class ScriptWrapper {
return result;
}
@Override
public String toString() {
return name;
}
}

View File

@ -2,7 +2,7 @@
"__inputs": [
{
"name": "DS_SYSMON",
"label": "sysmon",
"label": "Database",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
@ -76,7 +76,7 @@
}
]
},
"description": "https://bitbucket.org/mnellemann/sysmon/ - Metrics from sysmon agent.",
"description": "https://git.data.coop/nellemann/sysmon/ - Metrics from sysmon agent.",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
@ -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: [bitbucket.org/mnellemann/sysmon](https://bitbucket.org/mnellemann/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",
@ -565,7 +565,7 @@
{
"matcher": {
"id": "byName",
"options": "aix_processor.mode"
"options": "power_processor.mode"
},
"properties": [
{
@ -585,7 +585,7 @@
{
"matcher": {
"id": "byName",
"options": "aix_processor.type"
"options": "power_processor.type"
},
"properties": [
{
@ -605,7 +605,7 @@
{
"matcher": {
"id": "byName",
"options": "aix_processor.ent"
"options": "power_processor.ent"
},
"properties": [
{
@ -621,7 +621,7 @@
{
"matcher": {
"id": "byName",
"options": "aix_processor.lcpu"
"options": "power_processor.lcpu"
},
"properties": [
{
@ -637,7 +637,7 @@
{
"matcher": {
"id": "byName",
"options": "aix_processor.smt"
"options": "power_processor.smt"
},
"properties": [
{
@ -691,9 +691,11 @@
"type": "fill"
}
],
"measurement": "aix_processor",
"measurement": "power_processor",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"mode\") AS \"mode\", last(\"type\") AS \"type\", last(\"ent\") AS \"ent\", last(\"lcpu\") AS \"lcpu\", last(\"smt\") AS \"smt\" FROM \"power_processor\" WHERE (\"hostname\" =~ /^$hostname$/) AND $timeFilter GROUP BY time($__interval) fill(previous) SLIMIT 1",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
@ -805,11 +807,11 @@
"options": {
"include": {
"names": [
"aix_processor.mode",
"aix_processor.type",
"aix_processor.ent",
"aix_processor.lcpu",
"aix_processor.smt"
"power_processor.mode",
"power_processor.type",
"power_processor.ent",
"power_processor.lcpu",
"power_processor.smt"
]
}
}
@ -989,12 +991,6 @@
],
"type": "moving_average"
},
{
"params": [
"*-1"
],
"type": "math"
},
{
"params": [
"steal"
@ -1277,7 +1273,7 @@
{
"matcher": {
"id": "byName",
"options": "aix_processor.entc"
"options": "power_processor.entc"
},
"properties": [
{
@ -1293,7 +1289,7 @@
{
"matcher": {
"id": "byName",
"options": "aix_processor.physc"
"options": "power_processor.physc"
},
"properties": [
{
@ -1305,7 +1301,7 @@
{
"matcher": {
"id": "byName",
"options": "aix_processor.lbusy"
"options": "power_processor.lbusy"
},
"properties": [
{
@ -1363,7 +1359,7 @@
"type": "fill"
}
],
"measurement": "aix_processor",
"measurement": "power_processor",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
@ -2085,7 +2081,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -2489,7 +2486,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@ -2647,7 +2645,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -2787,7 +2786,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@ -2980,7 +2980,8 @@
"mode": "absolute",
"steps": [
{
"color": "transparent"
"color": "transparent",
"value": null
},
{
"color": "orange",
@ -3157,6 +3158,6 @@
"timezone": "",
"title": "Sysmon - Host Overview",
"uid": "QkVPjseMt",
"version": 21,
"version": 23,
"weekStart": ""
}
}

View File

@ -2,7 +2,7 @@
"__inputs": [
{
"name": "DS_SYSMON",
"label": "sysmon",
"label": "Database",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
@ -58,7 +58,7 @@
}
]
},
"description": "https://bitbucket.org/mnellemann/sysmon/ - Metrics from sysmon agent.",
"description": "https://git.data.coop/nellemann/sysmon/ - Metrics from sysmon agent.",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
@ -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: [bitbucket.org/mnellemann/sysmon](https://bitbucket.org/mnellemann/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",
@ -351,7 +351,7 @@
"type": "fill"
}
],
"measurement": "aix_processor",
"measurement": "power_processor",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
@ -495,7 +495,7 @@
"type": "fill"
}
],
"measurement": "aix_processor",
"measurement": "power_processor",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
@ -640,7 +640,7 @@
"type": "fill"
}
],
"measurement": "aix_processor",
"measurement": "power_processor",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
@ -693,14 +693,14 @@
"type": "influxdb",
"uid": "${DS_SYSMON}"
},
"definition": "SHOW TAG VALUES FROM \"aix_processor\" WITH KEY = \"hostname\" WHERE time > now() - 60m",
"definition": "SHOW TAG VALUES FROM \"power_processor\" WITH KEY = \"hostname\" WHERE time > now() - 60m",
"hide": 0,
"includeAll": true,
"label": "Host",
"multi": true,
"name": "hostname",
"options": [],
"query": "SHOW TAG VALUES FROM \"aix_processor\" WITH KEY = \"hostname\" WHERE time > now() - 60m",
"query": "SHOW TAG VALUES FROM \"power_processor\" WITH KEY = \"hostname\" WHERE time > now() - 60m",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
@ -735,4 +735,4 @@
"uid": "3zPCIbN4z",
"version": 7,
"weekStart": ""
}
}

View File

@ -2,7 +2,7 @@
"__inputs": [
{
"name": "DS_SYSMON",
"label": "sysmon",
"label": "Database",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
@ -70,7 +70,7 @@
}
]
},
"description": "https://bitbucket.org/mnellemann/sysmon/ - Metrics from within host / guest / partition.",
"description": "https://git.data.coop/nellemann/sysmon/ - Metrics from within host / guest / partition.",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
@ -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: [bitbucket.org/mnellemann/sysmon](https://bitbucket.org/mnellemann/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",
@ -1057,4 +1057,4 @@
"uid": "Vjut5mS7k",
"version": 5,
"weekStart": ""
}
}

BIN
doc/screenshots/sysmon1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

BIN
doc/screenshots/sysmon2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -1,9 +1,9 @@
version = 1.1.0
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.

View File

@ -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

12
gradlew vendored
View File

@ -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

1
gradlew.bat vendored
View File

@ -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%

View File

@ -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;
}

View File

@ -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;

View File

@ -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));
}

View File

@ -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;
}

View File

@ -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() {

View File

@ -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;

View File

@ -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)
}

View File

@ -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);
}
}

View File

@ -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 {

View File

@ -21,15 +21,6 @@ public class ServerRouteBuilder extends RouteBuilder {
.host(registry.lookupByNameAndType("http.host", String.class))
.port(registry.lookupByNameAndType("http.port", Integer.class));
/*
rest()
.get("/")
.produces("text/html")
.route()
.to("log:stdout")
.endRest();
*/
rest()
.post("/metrics")
.consumes("application/json")

View File

@ -16,4 +16,4 @@ new File(rootDir, "plugins").listFiles().each {
include ":plugins:${it.name}"
}
}
}

View File

@ -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) {