You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ma...@apache.org on 2013/11/27 05:50:07 UTC
[1/8] git commit: Add checkOpenPorts() method to health stat publisher
Updated Branches:
refs/heads/master 757f7bf00 -> d2365339d
Add checkOpenPorts() method to health stat publisher
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/bce62b06
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/bce62b06
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/bce62b06
Branch: refs/heads/master
Commit: bce62b063bb504ec43408b38323aaf7dd646c483
Parents: 4316ae2
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Mon Nov 25 15:06:22 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Mon Nov 25 15:06:22 2013 +0530
----------------------------------------------------------------------
.../src/main/bin/health-publisher.sh | 2 +-
.../health/publisher/HealthPublisherClient.java | 25 ++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/bce62b06/products/cartridge-agent/modules/health-stats/src/main/bin/health-publisher.sh
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/modules/health-stats/src/main/bin/health-publisher.sh b/products/cartridge-agent/modules/health-stats/src/main/bin/health-publisher.sh
index f5c0104..17b9521 100755
--- a/products/cartridge-agent/modules/health-stats/src/main/bin/health-publisher.sh
+++ b/products/cartridge-agent/modules/health-stats/src/main/bin/health-publisher.sh
@@ -28,7 +28,7 @@ class_path=${lib_path}andes-client-0.13.wso2v8.jar:${lib_path}ant-1.7.0.jar:${li
current_path=`pwd`
-java -cp $class_path -Dmember.id=$1 -Dkey.file.path=$current_path/../security/client-truststore.jks -Dthrift.receiver.ip=$2 -Dthrift.receiver.port=$3 org.apache.stratos.cartridge.agent.health.publisher.Main $*
+java -cp $class_path -Dmember.id=$1 -Dkey.file.path=$current_path/../security/client-truststore.jks -Dthrift.receiver.ip=$2 -Dthrift.receiver.port=$3 -Dopen.ports=$4 org.apache.stratos.cartridge.agent.health.publisher.Main $*
echo "Health publisher completed"
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/bce62b06/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisherClient.java
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisherClient.java b/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisherClient.java
index d452c03..26fedca 100644
--- a/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisherClient.java
+++ b/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisherClient.java
@@ -27,6 +27,7 @@ import java.lang.System;
import java.util.HashMap;
import java.util.Map;
import java.lang.management.ManagementFactory;
+import java.net.*;
public class HealthPublisherClient {
@@ -45,6 +46,13 @@ public class HealthPublisherClient {
statsMap.put("memory_consumption", memoryConsumption);
statsMap.put("load_average", (double)ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage());
+ // This section checks open ports in the vm
+ boolean isOpen = checkOpenPorts();
+
+ if ( !isOpen ) {
+ statsMap.put("port_not_open", 0.0);
+ }
+
Object statObj = (Object)statsMap;
return statObj;
@@ -64,4 +72,21 @@ public class HealthPublisherClient {
Thread.currentThread().interrupt();
}
}
+
+ private boolean checkOpenPorts() {
+ int portNumber = 0;
+ String ports = System.getProperty("open.ports");
+ String[] portsArray = ports.split(",");
+
+ for (int i = 0; i < portsArray.length; i++) {
+ try {
+ portNumber = Integer.parseInt(portsArray[i].trim());
+ Socket ServerSok = new Socket("127.0.0.1", portNumber);
+ ServerSok.close();
+ } catch (Exception e) {
+ return false;
+ }
+ }
+ return true;
+ }
}
\ No newline at end of file
[6/8] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/3ecb7c61
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/3ecb7c61
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/3ecb7c61
Branch: refs/heads/master
Commit: 3ecb7c61e7c38be3bd4f8482dbe8accf0a245cf3
Parents: e47c24c 04ae121
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Tue Nov 26 16:55:02 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Tue Nov 26 16:55:02 2013 +0530
----------------------------------------------------------------------
.../stratos/autoscaler/TestKnowledgeBase.java | 50 ++++++++++++++++++++
.../broker/heartbeat/TopicHealthChecker.java | 7 +--
.../distribution/src/main/conf/autoscaler.drl | 50 ++++++++++++--------
3 files changed, 83 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
[8/8] git commit: Modified AverageHeathRequest execution plan to find
unreachable ports
Posted by ma...@apache.org.
Modified AverageHeathRequest execution plan to find unreachable ports
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/d2365339
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/d2365339
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/d2365339
Branch: refs/heads/master
Commit: d2365339d734b66737460f84eaf437e930973273
Parents: 2fbefde
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Wed Nov 27 10:17:14 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Wed Nov 27 10:17:14 2013 +0530
----------------------------------------------------------------------
extensions/cep/artifacts/executionplans/AverageHeathRequest.xml | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d2365339/extensions/cep/artifacts/executionplans/AverageHeathRequest.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/executionplans/AverageHeathRequest.xml b/extensions/cep/artifacts/executionplans/AverageHeathRequest.xml
index cfb9166..b40f3bb 100644
--- a/extensions/cep/artifacts/executionplans/AverageHeathRequest.xml
+++ b/extensions/cep/artifacts/executionplans/AverageHeathRequest.xml
@@ -10,6 +10,7 @@
<stream as="healthStats1" name="stratos.agent.health.stats" version="1.0.0"/>
</importedStreams>
<queryExpressions><![CDATA[define partition healthStats1Partition by member_id;
+ from healthStats1 [health_description == 'port_not_open'] select member_id insert into fault_message partition by healthStats1Partition;
from healthStats1 [health_description == 'load_average'] #window.timeBatch(1 min) select member_id, avg(value) as average_load_average insert into average_load_average_stats partition by healthStats1Partition;
from healthStats1 [health_description == 'memory_consumption'] #window.timeBatch(1 min) select member_id, avg(value) as average_memory_consumption insert into average_memory_consumption_stats partition by healthStats1Partition;]]></queryExpressions>
<exportedStreams>
@@ -17,5 +18,7 @@
valueOf="average_load_average_stats" version="1.0.0"/>
<stream name="average_memory_consumption_stats" passthroughFlow="disable"
valueOf="average_memory_consumption_stats" version="1.0.0"/>
+ <stream name="fault_message" passthroughFlow="disable"
+ valueOf="fault_message" version="1.0.0"/>
</exportedStreams>
</executionPlan>
[2/8] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/134b81f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/134b81f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/134b81f9
Branch: refs/heads/master
Commit: 134b81f9ce4643d9daaa80db3ac93de3241f91fd
Parents: bce62b0 efc45db
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Mon Nov 25 16:50:20 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Mon Nov 25 16:50:20 2013 +0530
----------------------------------------------------------------------
.../modules/event-subscriber/src/main/bin/event-subscriber.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[7/8] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/2fbefde9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/2fbefde9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/2fbefde9
Branch: refs/heads/master
Commit: 2fbefde9472fc9e057091036bee27c46f0ebcfda
Parents: 3ecb7c6 757f7bf
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Wed Nov 27 09:20:14 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Wed Nov 27 09:20:14 2013 +0530
----------------------------------------------------------------------
.../stratos/adc/mgt/dto/SubscriptionInfo.java | 2 +
.../stratos/autoscaler/ClusterContext.java | 9 +-
.../rule/AutoscalerRuleEvaluator.java | 3 +-
.../src/main/resources/autoscaler.drl | 114 -------------------
.../impl/CloudControllerServiceImpl.java | 30 ++---
.../distribution/src/main/conf/autoscaler.drl | 32 +++---
6 files changed, 36 insertions(+), 154 deletions(-)
----------------------------------------------------------------------
[5/8] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/e47c24c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/e47c24c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/e47c24c9
Branch: refs/heads/master
Commit: e47c24c97cc72e1ae2ebb77680ec050eacb2dea1
Parents: aadee12 b431ec1
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Tue Nov 26 11:31:03 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Tue Nov 26 11:31:03 2013 +0530
----------------------------------------------------------------------
.../broker/heartbeat/TopicHealthChecker.java | 8 +-
.../distribution/src/main/assembly/bin.xml | 6 +-
.../distribution/src/main/conf/log4j.properties | 16 +-
.../src/main/resources/log4j.properties | 168 --------------
.../distribution/src/main/assembly/bin.xml | 10 +-
.../distribution/src/main/conf/log4j.properties | 224 ++++++++++++-------
.../src/main/resources/log4j.properties | 196 ----------------
7 files changed, 162 insertions(+), 466 deletions(-)
----------------------------------------------------------------------
[4/8] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/aadee124
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/aadee124
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/aadee124
Branch: refs/heads/master
Commit: aadee1241966412eab1a107d9985e30d91ef4145
Parents: b34640a 99fdf34
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Tue Nov 26 10:31:26 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Tue Nov 26 10:31:26 2013 +0530
----------------------------------------------------------------------
.../pom.xml | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
[3/8] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/b34640a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/b34640a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/b34640a5
Branch: refs/heads/master
Commit: b34640a561e32941a51e286512858e349f594a33
Parents: 134b81f da39104
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Mon Nov 25 17:02:13 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Mon Nov 25 17:02:13 2013 +0530
----------------------------------------------------------------------
.../HealthStatisticsEventBuilder.xml | 10 ++++++++
.../AverageLoadAverageEventFormatter.xml | 11 +++++++++
.../AverageMemoryConsumptionEventFormatter.xml | 11 +++++++++
.../FaultMessageEventFormatter.xml | 11 +++++++++
.../GradientLoadAverageEventFormatter.xml | 11 +++++++++
.../GradientMemoryConsumptionEventFormatter.xml | 11 +++++++++
...econdDerivativeLoadAverageEventFormatter.xml | 11 +++++++++
...erivativeMemoryConsumptionEventFormatter.xml | 11 +++++++++
.../executionplans/AverageHeathRequest.xml | 21 +++++++++++++++++
.../executionplans/GradientOfHealthRequest.xml | 24 ++++++++++++++++++++
.../SecondDerivativeOfHealthRequest.xml | 21 +++++++++++++++++
11 files changed, 153 insertions(+)
----------------------------------------------------------------------