Compare commits
No commits in common. "main" and "v1.1.0" have entirely different histories.
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -2,14 +2,9 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## [1.1.2] - 2023-02-06
|
## [1.1.1] - 2023-01-xx
|
||||||
- Lowercase client hostnames
|
|
||||||
|
|
||||||
## [1.1.1] - 2023-01-22
|
|
||||||
- Simplify plugin naming
|
- Simplify plugin naming
|
||||||
- Initial support for executing (groovy) scripts
|
- Initial support for calling (groovy) scripts
|
||||||
- Fixed bug when no config file were found
|
|
||||||
- Update the default [dashboards](doc/dashboards/)
|
|
||||||
|
|
||||||
## [1.1.0] - 2022-12-17
|
## [1.1.0] - 2022-12-17
|
||||||
- Lower influx time precision from milliseconds to seconds
|
- Lower influx time precision from milliseconds to seconds
|
||||||
|
@ -55,7 +50,6 @@ All notable changes to this project will be documented in this file.
|
||||||
### Changed
|
### Changed
|
||||||
- Updated 3rd party dependencies.
|
- Updated 3rd party dependencies.
|
||||||
|
|
||||||
<!--
|
|
||||||
[1.1.0]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v1.1.0%0Dv0.1.24
|
[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.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
|
[1.0.23]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v1.0.23%0Dv0.1.21
|
||||||
|
@ -65,4 +59,3 @@ 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.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.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
|
[0.1.9]: https://bitbucket.org/mnellemann/sysmon/branches/compare/v0.1.9%0Dv0.1.8
|
||||||
-->
|
|
||||||
|
|
55
README.md
55
README.md
|
@ -1,3 +1,54 @@
|
||||||
# Repository moved
|
# System Monitor
|
||||||
|
|
||||||
Please visit [github.com/mnellemann/sysmon](https://github.com/mnellemann/sysmon)
|
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';
|
||||||
|
```
|
||||||
|
|
|
@ -45,5 +45,4 @@ tasks.register("packages") {
|
||||||
|
|
||||||
dependsOn ":plugins:buildDeb"
|
dependsOn ":plugins:buildDeb"
|
||||||
dependsOn ":plugins:buildRpm"
|
dependsOn ":plugins:buildRpm"
|
||||||
dependsOn ":plugins:buildZip"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ plugins {
|
||||||
|
|
||||||
id "net.nemerosa.versioning" version "2.15.1"
|
id "net.nemerosa.versioning" version "2.15.1"
|
||||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||||
id "com.netflix.nebula.ospackage" version "11.3.0"
|
id "com.netflix.nebula.ospackage" version "10.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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:
|
The RPM packages are *"noarch"* Java bytecode, so we can use the **--ignoreos** option to install:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
rpm -ivh --ignoreos sysmon-client-*.rpm sysmon-plugins-*.rpm
|
rpm -i --ignoreos sysmon-client.rpm sysmon-plugins.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run automatically at boot
|
### Run automatically at boot
|
||||||
|
|
|
@ -18,9 +18,11 @@ Use *yum* if *dnf* is not available.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
[Download](https://git.data.coop/nellemann/-/packages/generic/sysmon/) the latest client and plugins rpm files and install:
|
[Download](https://bitbucket.org/mnellemann/sysmon/downloads/) the latest client and plugins rpm files and install:
|
||||||
|
|
||||||
```shell
|
```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
|
rpm -ivh sysmon-client-*.noarch.rpm sysmon-plugins-*.noarch.rpm
|
||||||
cp /opt/sysmon/client/doc/sysmon-client.service /etc/systemd/system/
|
cp /opt/sysmon/client/doc/sysmon-client.service /etc/systemd/system/
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
|
@ -19,12 +19,11 @@ pid_file="/var/run/$name.pid"
|
||||||
stdout_log="/var/log/$name.log"
|
stdout_log="/var/log/$name.log"
|
||||||
stderr_log="/var/log/$name.err"
|
stderr_log="/var/log/$name.err"
|
||||||
|
|
||||||
# Java 8+ runtime required - Uncomment and export JAVA_HOME if needed
|
# Uncomment if required
|
||||||
#JAVA_HOME=/usr/java8_64
|
#JAVA_HOME=/usr/java8_64
|
||||||
#JAVA_HOME=/opt/ibm-semeru-open-XX-jre
|
#JAVA_HOME=/opt/ibm-semeru-open-8-jdk
|
||||||
#JAVA_HOME=/opt/ibm-semeru-open-XX-jdk
|
#JAVA_HOME=/opt/ibm-semeru-open-11-jdk
|
||||||
#JAVA_HOME=/opt/ibm/ibm-semeru-certified-XX-jre
|
#JAVA_HOME=/opt/ibm-semeru-open-17-jdk
|
||||||
#JAVA_HOME=/opt/ibm/ibm-semeru-certified-XX-jdk
|
|
||||||
#export JAVA_HOME
|
#export JAVA_HOME
|
||||||
|
|
||||||
get_pid() {
|
get_pid() {
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class Application implements Callable<Integer> {
|
||||||
try {
|
try {
|
||||||
configuration.parse(configurationFile.toPath());
|
configuration.parse(configurationFile.toPath());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.err.println("Could not parse configuration file: " + e.getMessage());
|
System.err.println(e.getMessage());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,6 @@ public class ClientRouteBuilder extends RouteBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
from("seda:metrics?purgeWhenStopping=true")
|
from("seda:metrics?purgeWhenStopping=true")
|
||||||
.routeId("aggregation")
|
|
||||||
.aggregate(constant(true), AggregationStrategies.beanAllowNull(ComboAppender.class, "append"))
|
.aggregate(constant(true), AggregationStrategies.beanAllowNull(ComboAppender.class, "append"))
|
||||||
.completionTimeout(5000L)
|
.completionTimeout(5000L)
|
||||||
.doTry()
|
.doTry()
|
||||||
|
@ -73,7 +72,6 @@ public class ClientRouteBuilder extends RouteBuilder {
|
||||||
.end();
|
.end();
|
||||||
|
|
||||||
from("seda:outbound?purgeWhenStopping=true")
|
from("seda:outbound?purgeWhenStopping=true")
|
||||||
.routeId("outbound")
|
|
||||||
.setHeader(Exchange.HTTP_METHOD, constant("POST"))
|
.setHeader(Exchange.HTTP_METHOD, constant("POST"))
|
||||||
.doTry()
|
.doTry()
|
||||||
.marshal(new JacksonDataFormat(ComboResult.class))
|
.marshal(new JacksonDataFormat(ComboResult.class))
|
||||||
|
@ -110,7 +108,6 @@ public class ClientRouteBuilder extends RouteBuilder {
|
||||||
Registry registry = getContext().getRegistry();
|
Registry registry = getContext().getRegistry();
|
||||||
|
|
||||||
from("timer:scripts?fixedRate=true&period=30s")
|
from("timer:scripts?fixedRate=true&period=30s")
|
||||||
.routeId(script.toString())
|
|
||||||
.bean(script, "run")
|
.bean(script, "run")
|
||||||
.outputType(MetricResult.class)
|
.outputType(MetricResult.class)
|
||||||
.process(new MetricEnrichProcessor(registry))
|
.process(new MetricEnrichProcessor(registry))
|
||||||
|
@ -132,7 +129,6 @@ public class ClientRouteBuilder extends RouteBuilder {
|
||||||
String timerName = ext.isThreaded() ? ext.getName() : "default";
|
String timerName = ext.isThreaded() ? ext.getName() : "default";
|
||||||
String timerInterval = (ext.getInterval() != null) ? ext.getInterval() : "30s";
|
String timerInterval = (ext.getInterval() != null) ? ext.getInterval() : "30s";
|
||||||
from("timer:" + timerName + "?fixedRate=true&period=" + timerInterval)
|
from("timer:" + timerName + "?fixedRate=true&period=" + timerInterval)
|
||||||
.routeId(ext.getName())
|
|
||||||
.bean(ext, "getMetrics")
|
.bean(ext, "getMetrics")
|
||||||
.outputType(MetricResult.class)
|
.outputType(MetricResult.class)
|
||||||
.process(new MetricEnrichProcessor(registry))
|
.process(new MetricEnrichProcessor(registry))
|
||||||
|
|
|
@ -67,10 +67,6 @@ public final class Configuration {
|
||||||
|
|
||||||
|
|
||||||
String getScriptPath() {
|
String getScriptPath() {
|
||||||
if(result == null) {
|
|
||||||
log.debug("No configuration file loaded ...");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return result.getString("scripts");
|
return result.getString("scripts");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,8 @@ public class ScriptWrapper {
|
||||||
private final static GroovyClassLoader loader = new GroovyClassLoader();
|
private final static GroovyClassLoader loader = new GroovyClassLoader();
|
||||||
|
|
||||||
private GroovyObject script;
|
private GroovyObject script;
|
||||||
private final String name;
|
|
||||||
|
|
||||||
public ScriptWrapper(String scriptPath, String scriptFile) {
|
public ScriptWrapper(String scriptPath, String scriptFile) {
|
||||||
name = scriptFile;
|
|
||||||
try {
|
try {
|
||||||
Class<?> scriptClass = loader.parseClass(new File(scriptPath, scriptFile));
|
Class<?> scriptClass = loader.parseClass(new File(scriptPath, scriptFile));
|
||||||
script = (GroovyObject) scriptClass.getDeclaredConstructor().newInstance();
|
script = (GroovyObject) scriptClass.getDeclaredConstructor().newInstance();
|
||||||
|
@ -39,9 +37,5 @@ public class ScriptWrapper {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"__inputs": [
|
"__inputs": [
|
||||||
{
|
{
|
||||||
"name": "DS_SYSMON",
|
"name": "DS_SYSMON",
|
||||||
"label": "Database",
|
"label": "sysmon",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "datasource",
|
"type": "datasource",
|
||||||
"pluginId": "influxdb",
|
"pluginId": "influxdb",
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": "https://git.data.coop/nellemann/sysmon/ - Metrics from sysmon agent.",
|
"description": "https://bitbucket.org/mnellemann/sysmon/ - Metrics from sysmon agent.",
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"fiscalYearStartMonth": 0,
|
"fiscalYearStartMonth": 0,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
},
|
},
|
||||||
"id": 28,
|
"id": 28,
|
||||||
"options": {
|
"options": {
|
||||||
"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 ",
|
"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 ",
|
||||||
"mode": "markdown"
|
"mode": "markdown"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.1.6",
|
"pluginVersion": "9.1.6",
|
||||||
|
@ -565,7 +565,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "power_processor.mode"
|
"options": "aix_processor.mode"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -585,7 +585,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "power_processor.type"
|
"options": "aix_processor.type"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -605,7 +605,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "power_processor.ent"
|
"options": "aix_processor.ent"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -621,7 +621,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "power_processor.lcpu"
|
"options": "aix_processor.lcpu"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -637,7 +637,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "power_processor.smt"
|
"options": "aix_processor.smt"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -691,11 +691,9 @@
|
||||||
"type": "fill"
|
"type": "fill"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"measurement": "power_processor",
|
"measurement": "aix_processor",
|
||||||
"orderByTime": "ASC",
|
"orderByTime": "ASC",
|
||||||
"policy": "default",
|
"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",
|
"refId": "A",
|
||||||
"resultFormat": "time_series",
|
"resultFormat": "time_series",
|
||||||
"select": [
|
"select": [
|
||||||
|
@ -807,11 +805,11 @@
|
||||||
"options": {
|
"options": {
|
||||||
"include": {
|
"include": {
|
||||||
"names": [
|
"names": [
|
||||||
"power_processor.mode",
|
"aix_processor.mode",
|
||||||
"power_processor.type",
|
"aix_processor.type",
|
||||||
"power_processor.ent",
|
"aix_processor.ent",
|
||||||
"power_processor.lcpu",
|
"aix_processor.lcpu",
|
||||||
"power_processor.smt"
|
"aix_processor.smt"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -991,6 +989,12 @@
|
||||||
],
|
],
|
||||||
"type": "moving_average"
|
"type": "moving_average"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"*-1"
|
||||||
|
],
|
||||||
|
"type": "math"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
"steal"
|
"steal"
|
||||||
|
@ -1273,7 +1277,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "power_processor.entc"
|
"options": "aix_processor.entc"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -1289,7 +1293,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "power_processor.physc"
|
"options": "aix_processor.physc"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -1301,7 +1305,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "power_processor.lbusy"
|
"options": "aix_processor.lbusy"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -1359,7 +1363,7 @@
|
||||||
"type": "fill"
|
"type": "fill"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"measurement": "power_processor",
|
"measurement": "aix_processor",
|
||||||
"orderByTime": "ASC",
|
"orderByTime": "ASC",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
|
@ -2081,8 +2085,7 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -2486,8 +2489,7 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
|
@ -2645,8 +2647,7 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -2786,8 +2787,7 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
|
@ -2980,8 +2980,7 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "transparent",
|
"color": "transparent"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "orange",
|
"color": "orange",
|
||||||
|
@ -3158,6 +3157,6 @@
|
||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "Sysmon - Host Overview",
|
"title": "Sysmon - Host Overview",
|
||||||
"uid": "QkVPjseMt",
|
"uid": "QkVPjseMt",
|
||||||
"version": 23,
|
"version": 21,
|
||||||
"weekStart": ""
|
"weekStart": ""
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
"__inputs": [
|
"__inputs": [
|
||||||
{
|
{
|
||||||
"name": "DS_SYSMON",
|
"name": "DS_SYSMON",
|
||||||
"label": "Database",
|
"label": "sysmon",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "datasource",
|
"type": "datasource",
|
||||||
"pluginId": "influxdb",
|
"pluginId": "influxdb",
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": "https://git.data.coop/nellemann/sysmon/ - Metrics from sysmon agent.",
|
"description": "https://bitbucket.org/mnellemann/sysmon/ - Metrics from sysmon agent.",
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"fiscalYearStartMonth": 0,
|
"fiscalYearStartMonth": 0,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
},
|
},
|
||||||
"id": 28,
|
"id": 28,
|
||||||
"options": {
|
"options": {
|
||||||
"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 ",
|
"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 ",
|
||||||
"mode": "markdown"
|
"mode": "markdown"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.1.6",
|
"pluginVersion": "9.1.6",
|
||||||
|
@ -351,7 +351,7 @@
|
||||||
"type": "fill"
|
"type": "fill"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"measurement": "power_processor",
|
"measurement": "aix_processor",
|
||||||
"orderByTime": "ASC",
|
"orderByTime": "ASC",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
|
@ -495,7 +495,7 @@
|
||||||
"type": "fill"
|
"type": "fill"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"measurement": "power_processor",
|
"measurement": "aix_processor",
|
||||||
"orderByTime": "ASC",
|
"orderByTime": "ASC",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
|
@ -640,7 +640,7 @@
|
||||||
"type": "fill"
|
"type": "fill"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"measurement": "power_processor",
|
"measurement": "aix_processor",
|
||||||
"orderByTime": "ASC",
|
"orderByTime": "ASC",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
|
@ -693,14 +693,14 @@
|
||||||
"type": "influxdb",
|
"type": "influxdb",
|
||||||
"uid": "${DS_SYSMON}"
|
"uid": "${DS_SYSMON}"
|
||||||
},
|
},
|
||||||
"definition": "SHOW TAG VALUES FROM \"power_processor\" WITH KEY = \"hostname\" WHERE time > now() - 60m",
|
"definition": "SHOW TAG VALUES FROM \"aix_processor\" WITH KEY = \"hostname\" WHERE time > now() - 60m",
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": true,
|
"includeAll": true,
|
||||||
"label": "Host",
|
"label": "Host",
|
||||||
"multi": true,
|
"multi": true,
|
||||||
"name": "hostname",
|
"name": "hostname",
|
||||||
"options": [],
|
"options": [],
|
||||||
"query": "SHOW TAG VALUES FROM \"power_processor\" WITH KEY = \"hostname\" WHERE time > now() - 60m",
|
"query": "SHOW TAG VALUES FROM \"aix_processor\" WITH KEY = \"hostname\" WHERE time > now() - 60m",
|
||||||
"refresh": 2,
|
"refresh": 2,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
"skipUrlSync": false,
|
"skipUrlSync": false,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"__inputs": [
|
"__inputs": [
|
||||||
{
|
{
|
||||||
"name": "DS_SYSMON",
|
"name": "DS_SYSMON",
|
||||||
"label": "Database",
|
"label": "sysmon",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "datasource",
|
"type": "datasource",
|
||||||
"pluginId": "influxdb",
|
"pluginId": "influxdb",
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": "https://git.data.coop/nellemann/sysmon/ - Metrics from within host / guest / partition.",
|
"description": "https://bitbucket.org/mnellemann/sysmon/ - Metrics from within host / guest / partition.",
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"fiscalYearStartMonth": 0,
|
"fiscalYearStartMonth": 0,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
},
|
},
|
||||||
"id": 30,
|
"id": 30,
|
||||||
"options": {
|
"options": {
|
||||||
"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 ",
|
"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 ",
|
||||||
"mode": "markdown"
|
"mode": "markdown"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.1.6",
|
"pluginVersion": "9.1.6",
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 265 KiB |
Binary file not shown.
Before Width: | Height: | Size: 128 KiB |
|
@ -1,9 +1,9 @@
|
||||||
version = 1.1.4
|
version = 1.1.0
|
||||||
pf4jVersion = 3.9.0
|
pf4jVersion = 3.7.0
|
||||||
slf4jVersion = 2.0.9
|
slf4jVersion = 2.0.6
|
||||||
camelVersion = 3.14.9
|
camelVersion = 3.14.7
|
||||||
groovyVersion = 3.0.18
|
groovyVersion = 3.0.14
|
||||||
picocliVersion = 4.7.5
|
picocliVersion = 4.7.0
|
||||||
oshiVersion = 6.4.7
|
oshiVersion = 6.4.0
|
||||||
spockVersion = 2.3-groovy-3.0
|
spockVersion = 2.3-groovy-3.0
|
||||||
tomljVersion = 1.1.0
|
tomljVersion = 1.1.0
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||||
networkTimeout=10000
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
12
gradlew
vendored
12
gradlew
vendored
|
@ -55,7 +55,7 @@
|
||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
@ -80,11 +80,11 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# This is normally unused
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
APP_BASE_NAME=${0##*/}
|
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# 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"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
@ -143,16 +143,12 @@ fi
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
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 ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
'' | soft) :;; #(
|
'' | 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" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
|
|
1
gradlew.bat
vendored
1
gradlew.bat
vendored
|
@ -26,7 +26,6 @@ if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
@rem This is normally unused
|
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class BaseDiskExtension implements MetricExtension {
|
||||||
|
|
||||||
ArrayList<Measurement> measurementList = new ArrayList<>();
|
ArrayList<Measurement> measurementList = new ArrayList<>();
|
||||||
if(diskStores == null || refreshCounter++ > 360) {
|
if(diskStores == null || refreshCounter++ > 360) {
|
||||||
log.debug("getMetrics() - refreshing list of disk stores");
|
log.info("getMetrics() - refreshing list of disk stores");
|
||||||
diskStores = hardwareAbstractionLayer.getDiskStores();
|
diskStores = hardwareAbstractionLayer.getDiskStores();
|
||||||
refreshCounter = 0;
|
refreshCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import org.pf4j.Extension;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import oshi.SystemInfo;
|
import oshi.SystemInfo;
|
||||||
|
import oshi.hardware.HardwareAbstractionLayer;
|
||||||
import oshi.software.os.OSFileStore;
|
import oshi.software.os.OSFileStore;
|
||||||
import sysmon.shared.Measurement;
|
import sysmon.shared.Measurement;
|
||||||
import sysmon.shared.MetricExtension;
|
import sysmon.shared.MetricExtension;
|
||||||
|
|
|
@ -84,6 +84,7 @@ public class BaseInfoExtension implements MetricExtension {
|
||||||
put("boot_time", systemInfo.getOperatingSystem().getSystemBootTime());
|
put("boot_time", systemInfo.getOperatingSystem().getSystemBootTime());
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
log.info(fieldsMap.toString());
|
||||||
return new MetricResult(name, new Measurement(tags, fieldsMap));
|
return new MetricResult(name, new Measurement(tags, fieldsMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class BaseNetworkExtension implements MetricExtension {
|
||||||
|
|
||||||
ArrayList<Measurement> measurementList = new ArrayList<>();
|
ArrayList<Measurement> measurementList = new ArrayList<>();
|
||||||
if(interfaces == null || refreshCounter++ > 360) {
|
if(interfaces == null || refreshCounter++ > 360) {
|
||||||
log.debug("getMetrics() - refreshing list of network interfaces");
|
log.info("getMetrics() - refreshing list of network interfaces");
|
||||||
interfaces = hardwareAbstractionLayer.getNetworkIFs();
|
interfaces = hardwareAbstractionLayer.getNetworkIFs();
|
||||||
refreshCounter = 0;
|
refreshCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package sysmon.plugins.base;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.pf4j.Plugin;
|
import org.pf4j.Plugin;
|
||||||
|
import org.pf4j.PluginWrapper;
|
||||||
import oshi.SystemInfo;
|
import oshi.SystemInfo;
|
||||||
import oshi.hardware.HardwareAbstractionLayer;
|
import oshi.hardware.HardwareAbstractionLayer;
|
||||||
|
|
||||||
|
@ -14,6 +15,9 @@ public class BasePlugin extends Plugin {
|
||||||
private static SystemInfo systemInfo;
|
private static SystemInfo systemInfo;
|
||||||
private static HardwareAbstractionLayer hardwareAbstractionLayer;
|
private static HardwareAbstractionLayer hardwareAbstractionLayer;
|
||||||
|
|
||||||
|
public BasePlugin(PluginWrapper wrapper) {
|
||||||
|
super(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
public static HardwareAbstractionLayer getHardwareAbstractionLayer() {
|
public static HardwareAbstractionLayer getHardwareAbstractionLayer() {
|
||||||
|
|
||||||
|
|
|
@ -38,13 +38,10 @@ public class BaseProcessExtension implements MetricExtension {
|
||||||
add("corosync");
|
add("corosync");
|
||||||
add("rsyslogd");
|
add("rsyslogd");
|
||||||
add("postgres");
|
add("postgres");
|
||||||
add("mariadbd");
|
|
||||||
add("memcached");
|
add("memcached");
|
||||||
add("db2sysc");
|
add("db2sysc");
|
||||||
add("dsmserv");
|
add("dsmserv");
|
||||||
add("mmfsd");
|
add("mmfsd");
|
||||||
add("systemd");
|
|
||||||
add("nginx");
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
private final long minUptimeInSeconds = 600;
|
private final long minUptimeInSeconds = 600;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import org.redline_rpm.header.Os
|
import org.redline_rpm.header.Os
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "com.netflix.nebula.ospackage" version "11.3.0"
|
id "com.netflix.nebula.ospackage" version "10.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,12 +110,3 @@ task buildRpmAix(type: Rpm) {
|
||||||
packageName = "${projectName}-AIX"
|
packageName = "${projectName}-AIX"
|
||||||
os = Os.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,7 +1,18 @@
|
||||||
package sysmon.plugins.power;
|
package sysmon.plugins.power;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.pf4j.Plugin;
|
import org.pf4j.Plugin;
|
||||||
|
import org.pf4j.PluginWrapper;
|
||||||
|
|
||||||
public class PowerPlugin extends Plugin {
|
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 "net.nemerosa.versioning" version "2.15.1"
|
||||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||||
id "com.netflix.nebula.ospackage" version "11.3.0"
|
id "com.netflix.nebula.ospackage" version "10.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -21,6 +21,15 @@ public class ServerRouteBuilder extends RouteBuilder {
|
||||||
.host(registry.lookupByNameAndType("http.host", String.class))
|
.host(registry.lookupByNameAndType("http.host", String.class))
|
||||||
.port(registry.lookupByNameAndType("http.port", Integer.class));
|
.port(registry.lookupByNameAndType("http.port", Integer.class));
|
||||||
|
|
||||||
|
/*
|
||||||
|
rest()
|
||||||
|
.get("/")
|
||||||
|
.produces("text/html")
|
||||||
|
.route()
|
||||||
|
.to("log:stdout")
|
||||||
|
.endRest();
|
||||||
|
*/
|
||||||
|
|
||||||
rest()
|
rest()
|
||||||
.post("/metrics")
|
.post("/metrics")
|
||||||
.consumes("application/json")
|
.consumes("application/json")
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class MetricResult implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHostname(String hostname) {
|
public void setHostname(String hostname) {
|
||||||
this.hostname = hostname.toLowerCase();
|
this.hostname = hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
|
|
Loading…
Reference in a new issue