Skip to content

Commit

Permalink
New sensors and features
Browse files Browse the repository at this point in the history
New features added to development branch
  • Loading branch information
JRAndreassen committed Jun 17, 2015
1 parent 98c8de5 commit 67c72ee
Show file tree
Hide file tree
Showing 145 changed files with 24,843 additions and 469 deletions.
60 changes: 60 additions & 0 deletions JMXDependencies/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.paessler.prtg</groupId>
<artifactId>JavaMiniProbe</artifactId>
<version>1.0</version>
</parent>
<artifactId>JMXDependencies</artifactId>
<packaging>pom</packaging>
<name>JMXDependencies</name>
<url>https://github.com/PaesslerAG/JMXMiniProbe</url>

<build>
<plugins>
<!-- http://stackoverflow.com/questions/10802280/multiple-installinstall-file-in-a-single-pom-xml -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>inst_icmp4j</id>
<phase>package</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<!-- config for file 1 -->
<!--file>${project.basedir}/../web/WEB-INF/lib/icmp4j.jar</file-->
<file>${project.basedir}/../web/WEB-INF/customlib/icmp4j.jar</file>
<groupId>org.icmp4j</groupId>
<artifactId>icmp4j</artifactId>
<packaging>jar</packaging>
<!--version>${icmp4j.version}</version-->
<version>16.0.1017-1</version>
</configuration>
</execution>
<!-- WEBM library -->
<execution>
<id>inst_sblim</id>
<phase>package</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<!-- config for file 1 -->
<file>${project.basedir}/../lib/sblim-cim-client2.jar</file>
<groupId>org.sblim</groupId>
<artifactId>sblim-cim-client2</artifactId>
<packaging>jar</packaging>
<!--version>${sblime-client.version}</version-->
<version>2.2.5</version>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
202 changes: 202 additions & 0 deletions JMXMiniProbeJar/Example_JWS_and_RPM_pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
<!-- https://wiki.cantara.no/display/dev/Example+JSW+and+RPM ->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<profiles>
<profile>
<id>rpm</id>
<activation>
<property>
<name>env</name>
<value>prod</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration>
<repositoryLayout>flat</repositoryLayout>
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
<target>${project.build.directory}</target>
<defaultJvmSettings>
<initialMemorySize>256M</initialMemorySize>
<maxMemorySize>1024M</maxMemorySize>
<systemProperties>
<systemProperty>com.sun.management.jmxremote</systemProperty>
<systemProperty>com.sun.management.jmxremote.port=8999</systemProperty>
<systemProperty>com.sun.management.jmxremote.authenticate=false</systemProperty>
<systemProperty>com.sun.management.jmxremote.ssl=false</systemProperty>
</systemProperties>
<extraArguments>
<extraArgument>-server</extraArgument>
</extraArguments>
</defaultJvmSettings>
<daemons>
<daemon>
<id>${rpm.appname}</id>
<mainClass>com.company.MainClass</mainClass>
<commandLineArguments>
<commandLineArgument>start</commandLineArgument>
</commandLineArguments>
<platforms>
<platform>jsw</platform>
</platforms>
</daemon>
</daemons>
</configuration>
<executions>
<execution>
<id>libsAndScripts</id>
<phase>package</phase>
<goals>
<goal>generate-daemons</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>rpm</goal>
</goals>
</execution>
</executions>
<configuration>
<release>1</release>
<copyright>${pom.inceptionYear}, ${pom.organization.name}</copyright>
<group>Applications/Engineering</group>
<mappings>
<mapping>
<directory>${rpm.path}/bin</directory>
<filemode>770</filemode>
<username>${rpm.username}</username>
<groupname>${rpm.groupname}</groupname>
<sources>
<source>
<location>${jswDir}/bin</location>
<excludes>
<exclude>*.bat</exclude>
<exclude>*.exe</exclude>
</excludes>
</source>
</sources>
</mapping>
<mapping>
<directory>${rpm.path}/conf</directory>
<configuration>true</configuration>
<filemode>660</filemode>
<username>${rpm.username}</username>
<groupname>${rpm.groupname}</groupname>
<sources>
<source>
<location>${distDir}/conf</location>
</source>
</sources>
</mapping>
<mapping>
<directory>${rpm.path}/lib</directory>
<filemode>660</filemode>
<username>${rpm.username}</username>
<groupname>${rpm.groupname}</groupname>
<sources>
<source>
<location>${jswDir}/lib</location>
<excludes>
<exclude>*.dll</exclude>
</excludes>
</source>
</sources>
</mapping>
<mapping>
<directory>${rpm.path}/repo</directory>
<filemode>660</filemode>
<username>${rpm.username}</username>
<groupname>${rpm.groupname}</groupname>
<artifact>
<classifiers>
<classifier/>
</classifiers>
</artifact>
<dependency/>
</mapping>
<mapping>
<directory>${rpm.path}/logs</directory>
<filemode>660</filemode>
<username>${rpm.username}</username>
<groupname>${rpm.groupname}</groupname>
</mapping>
</mappings>
<preinstall>echo Installing ${rpm.appname} ...</preinstall>
<postinstall>
echo Configuring ${rpm.appname} init scripts
#!/bin/sh
ln -s ${rpm.path}/bin/${rpm.appname} /etc/init.d/${rpm.appname}
#update-rc.d ${rpm.appname} start 20 3 5 . stop 20 0 1 2 4 6 .
# configure chkconfig install
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --add ${rpm.appname}
else
ln -sf /etc/init.d/${rpm.appname} /etc/rc.d/rc3.d/S20${rpm.appname}
ln -sf /etc/init.d/${rpm.appname} /etc/rc.d/rc5.d/S20${rpm.appname}
ln -sf /etc/init.d/${rpm.appname} /etc/rc.d/rc0.d/K10${rpm.appname}
ln -sf /etc/init.d/${rpm.appname} /etc/rc.d/rc1.d/K10${rpm.appname}
ln -sf /etc/init.d/${rpm.appname} /etc/rc.d/rc2.d/K10${rpm.appname}
ln -sf /etc/init.d/${rpm.appname} /etc/rc.d/rc4.d/K10${rpm.appname}
ln -sf /etc/init.d/${rpm.appname} /etc/rc.d/rc6.d/K10${rpm.appname}
fi
</postinstall>
<preremove>
echo Removing ${rpm.appname} ...
#chkconfig scripts removal
#only on uninstall, not on upgrades.
if [ $1 = 0 ]; then
/etc/init.d/${rpm.appname} stop
if [ -x /sbin/chkconfig ]; then
echo "chkconfig --del ${rpm.appname}"
/sbin/chkconfig --del ${rpm.appname}
else
echo "Deleting /etc/rc.d/rc?.d/???${rpm.appname}"
rm -f /etc/rc.d/rc?.d/???${rpm.appname}
fi
fi
</preremove>
<postremove>
echo "Deleting /etc/init.d/${rpm.appname}"
rm /etc/init.d/${rpm.appname}
echo ${rpm.appname} is Successfully Removed!
</postremove>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<jswDir>${project.build.directory}/jsw/${rpm.appname}</jswDir>
<rpm.username>app1</rpm.username>
<rpm.groupname>app1</rpm.groupname>
<rpm.appname>app1</rpm.appname>
<rpm.path>/opt/${rpm.appname}</rpm.path>
</properties>
</project>
20 changes: 20 additions & 0 deletions JMXMiniProbeJar/installJMXMiniProbe
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/sh
_PWD=`pwd`
_APPNAME=runJMXMiniProbe
echo Installing $_APPNAME ...
ln -s $_PWD/bin/$_APPNAME /etc/init.d/$_APPNAME
#update-rc.d $_APPNAME start 20 3 5 . stop 20 0 1 2 4 6 .
# configure chkconfig install
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --add $_APPNAME
else
ln -sf /etc/init.d/$_APPNAME /etc/rc.d/rc3.d/S20$_APPNAME
ln -sf /etc/init.d/$_APPNAME /etc/rc.d/rc5.d/S20$_APPNAME

ln -sf /etc/init.d/$_APPNAME /etc/rc.d/rc0.d/K10$_APPNAME
ln -sf /etc/init.d/$_APPNAME /etc/rc.d/rc1.d/K10$_APPNAME
ln -sf /etc/init.d/$_APPNAME /etc/rc.d/rc2.d/K10$_APPNAME
ln -sf /etc/init.d/$_APPNAME /etc/rc.d/rc4.d/K10$_APPNAME
ln -sf /etc/init.d/$_APPNAME /etc/rc.d/rc6.d/K10$_APPNAME
fi

Loading

0 comments on commit 67c72ee

Please sign in to comment.