From d96fb0d85243def5946f4020f3cedcb6ad3e2870 Mon Sep 17 00:00:00 2001 From: Craig Bryant Date: Wed, 6 Aug 2014 17:13:54 -0600 Subject: [PATCH] Change to use monasca everywhere service is now monasca_thresh. Config file in /etc/monasca Fixed start and stop in install script Change-Id: I5272c8ac32e497be978f8c59c4c5b6964ed4e9d2 --- pom.xml | 4 ++-- thresh/pom.xml | 12 ++++++------ thresh/src/deb/control/control | 2 +- thresh/src/deb/control/postinst | 6 +++--- thresh/src/deb/control/prerm | 2 +- ...sh-config.yml-sample => thresh-config.yml-sample} | 0 thresh/src/deb/init/{mon-thresh => monasca-thresh} | 6 +++--- ...sh-sample-config.yml => thresh-sample-config.yml} | 0 thresh/src/main/resources/logback.xml | 2 +- thresh/src/test/resources/logback.xml | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) rename thresh/src/deb/etc/{mon-thresh-config.yml-sample => thresh-config.yml-sample} (100%) rename thresh/src/deb/init/{mon-thresh => monasca-thresh} (82%) rename thresh/src/main/config/{mon-thresh-sample-config.yml => thresh-sample-config.yml} (100%) diff --git a/pom.xml b/pom.xml index a38ea19..c6293c8 100644 --- a/pom.xml +++ b/pom.xml @@ -2,8 +2,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - monasca-common - monasca-common + monasca + monasca-thresh-base ${computedVersion} http://github.com/stackforge/monasca-common pom diff --git a/thresh/pom.xml b/thresh/pom.xml index 462b2da..6c83ccf 100644 --- a/thresh/pom.xml +++ b/thresh/pom.xml @@ -278,24 +278,24 @@ file ${project.build.directory}/${shadedJarName}.jar - /opt/mon/mon-thresh.jar + /opt/monasca/monasca-thresh.jar file - ${project.basedir}/src/deb/init/mon-thresh - /etc/init.d/mon-thresh + ${project.basedir}/src/deb/init/monasca-thresh + /etc/init.d/monasca-thresh file ${project.basedir}/src/main/resources/logback.xml - /etc/mon/logback.xml + /etc/monasca/logback.xml file - ${project.basedir}/src/deb/etc/mon-thresh-config.yml-sample + ${project.basedir}/src/deb/etc/thresh-config.yml-sample - /etc/mon/thresh-config.yml-sample + /etc/monasca/thresh-config.yml-sample diff --git a/thresh/src/deb/control/control b/thresh/src/deb/control/control index 224a3c6..4a6508e 100644 --- a/thresh/src/deb/control/control +++ b/thresh/src/deb/control/control @@ -4,6 +4,6 @@ Priority: optional Architecture: all Depends: openjdk-7-jre-headless | openjdk-7-jre Version: [[version]]-[[timestamp]]-[[buildNumber]] -Maintainer: HPCloud Monitoring +Maintainer: Monasca Team - monasca@lists.launchpad.net Description: Monasca-Thresh Reads metrics and generates alarms based on alarm definitions. diff --git a/thresh/src/deb/control/postinst b/thresh/src/deb/control/postinst index 15d0d58..589b64a 100755 --- a/thresh/src/deb/control/postinst +++ b/thresh/src/deb/control/postinst @@ -2,14 +2,14 @@ case "$1" in configure) - chmod +x /etc/init.d/mon-thresh + chmod +x /etc/init.d/monasca-thresh if ! [ `getent passwd thresh` ]; then adduser --system --group thresh fi #Restart does not pick up upstart job config changes stop/start is needed - stop mon-thresh - start mon-thresh + service monasca-thresh stop + service monasca-thresh start ;; esac diff --git a/thresh/src/deb/control/prerm b/thresh/src/deb/control/prerm index 4633f86..193d5ae 100644 --- a/thresh/src/deb/control/prerm +++ b/thresh/src/deb/control/prerm @@ -2,7 +2,7 @@ case "$1" in remove) - stop mon-thresh + service monasca-thresh stop ;; esac diff --git a/thresh/src/deb/etc/mon-thresh-config.yml-sample b/thresh/src/deb/etc/thresh-config.yml-sample similarity index 100% rename from thresh/src/deb/etc/mon-thresh-config.yml-sample rename to thresh/src/deb/etc/thresh-config.yml-sample diff --git a/thresh/src/deb/init/mon-thresh b/thresh/src/deb/init/monasca-thresh similarity index 82% rename from thresh/src/deb/init/mon-thresh rename to thresh/src/deb/init/monasca-thresh index 8553aef..4135bed 100755 --- a/thresh/src/deb/init/mon-thresh +++ b/thresh/src/deb/init/monasca-thresh @@ -1,6 +1,6 @@ #! /bin/sh #### BEGIN INIT INFO -## Provides: mon-thresh +## Provides: monasca-thresh ## Required-Start: $nimbus ## Required-Stop: ## Default-Start: 2 3 4 5 @@ -13,9 +13,9 @@ case "$1" in start) $0 status if [ $? -ne 0 ]; then - sudo -Hu thresh /opt/storm/current/bin/storm jar /opt/mon/mon-thresh.jar monasca.thresh.ThresholdingEngine /etc/mon/mon-thresh-config.yml thresh-cluster + sudo -Hu thresh /opt/storm/current/bin/storm jar /opt/monasca/monasca-thresh.jar monasca.thresh.ThresholdingEngine /etc/monasca/thresh-config.yml thresh-cluster else - echo "Mon-thresh is already running" + echo "monasca-thresh is already running" fi exit 0 ;; diff --git a/thresh/src/main/config/mon-thresh-sample-config.yml b/thresh/src/main/config/thresh-sample-config.yml similarity index 100% rename from thresh/src/main/config/mon-thresh-sample-config.yml rename to thresh/src/main/config/thresh-sample-config.yml diff --git a/thresh/src/main/resources/logback.xml b/thresh/src/main/resources/logback.xml index 8f36d50..509be9a 100644 --- a/thresh/src/main/resources/logback.xml +++ b/thresh/src/main/resources/logback.xml @@ -9,7 +9,7 @@ - ${LOGDIR:-/tmp}/mon-thresh.log + ${LOGDIR:-/tmp}/monasca-thresh.log %date %level [%thread] %logger{10} [%file:%line] %msg%n diff --git a/thresh/src/test/resources/logback.xml b/thresh/src/test/resources/logback.xml index 86e386a..769a417 100644 --- a/thresh/src/test/resources/logback.xml +++ b/thresh/src/test/resources/logback.xml @@ -9,7 +9,7 @@ - ${LOGDIR:-/tmp}/mon-thresh.log + ${LOGDIR:-/tmp}/monasca-thresh.log %date %level [%thread] %logger{10} [%file:%line] %msg%n