diff --git a/build.gradle b/build.gradle index 711de51..33063c7 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,7 @@ subprojects { dependencies { testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0' testImplementation "org.slf4j:slf4j-api:${slf4jVersion}" + testImplementation "org.slf4j:slf4j-simple:${slf4jVersion}" implementation "org.slf4j:slf4j-api:${slf4jVersion}" implementation "org.slf4j:slf4j-simple:${slf4jVersion}" diff --git a/client/src/main/java/sysmon/client/ClientRouteBuilder.java b/client/src/main/java/sysmon/client/ClientRouteBuilder.java index b339cef..bf9db77 100644 --- a/client/src/main/java/sysmon/client/ClientRouteBuilder.java +++ b/client/src/main/java/sysmon/client/ClientRouteBuilder.java @@ -56,6 +56,8 @@ public class ClientRouteBuilder extends RouteBuilder { .stop() .otherwise() .to("seda:metrics"); + } else { + log.info(">>> Skipping extension: " + ext.getDescription()); } } diff --git a/plugins/build.gradle b/plugins/build.gradle index 6a48326..8e5e287 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -4,8 +4,8 @@ plugins { id "nebula.ospackage" version "8.5.6" } -subprojects { +subprojects { apply plugin: 'java' apply plugin: 'groovy' @@ -15,14 +15,14 @@ subprojects { testImplementation project(':shared') implementation project(':shared') + implementation "org.slf4j:slf4j-api:${slf4jVersion}" implementation(group: 'org.pf4j', name: 'pf4j', version: "${pf4jVersion}") { exclude(group: "org.slf4j") } annotationProcessor(group: 'org.pf4j', name: 'pf4j', version: "${pf4jVersion}") - implementation "org.slf4j:slf4j-api:${slf4jVersion}" - } +/* jar { manifest { attributes( @@ -34,21 +34,37 @@ subprojects { ) } + }*/ + task uberJar(type: Jar) { + from sourceSets.main.output + dependsOn configurations.runtimeClasspath + from { + configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { + zipTree(it).matching { + exclude 'org/slf4j/**' + } + } + } + + manifest { + attributes( + 'Plugin-Id' : "${pluginId}", + 'Plugin-Class' : "${pluginClass}", + 'Plugin-Version' : "${pluginVersion}", + 'Plugin-Provider' : "${pluginProvider}", + 'Plugin-Description': "${pluginDescription}" + ) + } } - task fatJar(type: Jar) { - duplicatesStrategy(DuplicatesStrategy.INCLUDE) - from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } - with jar - } - - task copyJar(type: Copy, dependsOn:[fatJar]) { - from jar // here it automatically reads jar file produced from jar task + task copyJar(type: Copy, dependsOn: ['uberJar']) { + from jar into "../output/" } tasks.build.dependsOn { + uberJar copyJar } diff --git a/plugins/os-ibmi/README.md b/plugins/os-ibmi/README.md new file mode 100644 index 0000000..7931bd5 --- /dev/null +++ b/plugins/os-ibmi/README.md @@ -0,0 +1,7 @@ +# IBM i Plugin + +## Processor Extension + +## Memory Extension + +## Disk Extension diff --git a/plugins/os-ibmi/build.gradle b/plugins/os-ibmi/build.gradle new file mode 100644 index 0000000..f3624d7 --- /dev/null +++ b/plugins/os-ibmi/build.gradle @@ -0,0 +1,7 @@ +plugins { +} + +dependencies { + // https://mvnrepository.com/artifact/net.sf.jt400/jt400 + implementation group: 'net.sf.jt400', name: 'jt400', version: '10.6' +} \ No newline at end of file diff --git a/plugins/os-ibmi/gradle.properties b/plugins/os-ibmi/gradle.properties new file mode 100644 index 0000000..cf7297d --- /dev/null +++ b/plugins/os-ibmi/gradle.properties @@ -0,0 +1,6 @@ +pluginId=sysmon-ibmi +pluginClass=sysmon.plugins.os_ibmi.IbmIPlugin +pluginVersion=0.0.1 +pluginProvider=System Monitor +pluginDependencies= +pluginDescription=Collects IBM-i OS metrics. \ No newline at end of file diff --git a/plugins/os-ibmi/src/main/java/sysmon/plugins/os_ibmi/IbmIPlugin.java b/plugins/os-ibmi/src/main/java/sysmon/plugins/os_ibmi/IbmIPlugin.java new file mode 100644 index 0000000..c622954 --- /dev/null +++ b/plugins/os-ibmi/src/main/java/sysmon/plugins/os_ibmi/IbmIPlugin.java @@ -0,0 +1,18 @@ +package sysmon.plugins.os_ibmi; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.pf4j.Plugin; +import org.pf4j.PluginWrapper; + +public class IbmIPlugin extends Plugin { + + private static final Logger log = LoggerFactory.getLogger(IbmIPlugin.class); + + public IbmIPlugin(PluginWrapper wrapper) { + super(wrapper); + } + +} + + diff --git a/plugins/os-linux/build.gradle b/plugins/os-linux/build.gradle index e69de29..d18c3d3 100644 --- a/plugins/os-linux/build.gradle +++ b/plugins/os-linux/build.gradle @@ -0,0 +1,2 @@ +plugins { +} \ No newline at end of file