Skip to content

Commit 6dab3a6

Browse files
author
Ville Koskela
committed
Migrated content from combined metrics repository into dedicated cluster aggregator repository.
0 parents  commit 6dab3a6

File tree

250 files changed

+38920
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+38920
-0
lines changed

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Output
2+
target/
3+
logs/
4+
pom.xml.versionsBackup
5+
dependency-reduced-pom.xml
6+
7+
# Eclipse
8+
.metadata/
9+
.externalToolBuilders/
10+
maven-eclipse.xml
11+
bin/
12+
eclipse-bin/
13+
**/.classpath
14+
**/RemoteSystemsTempFiles/
15+
16+
# IntelliJ
17+
.idea
18+
.settings/
19+
*.iml
20+
21+
# Mac
22+
.DS_Store

DEPENDENCIES.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
Dependencies
2+
========
3+
4+
The following table lists the dependencies of the metrics cluster aggregator and their licenses.
5+
6+
Build Tool Dependencies
7+
------------------
8+
9+
Project | License | Project link
10+
-------------------------------|----------------------------|-------------
11+
Akka | Apache License 2 | http://akka.io
12+
Arp Networking Build Resources | Apache License 2 | https://github.com/ArpNetworking/build-resources
13+
Arp Networking Parent Pom | Apache License 2 | https://github.com/ArpNetworking/arpnetworking-parent-pom
14+
Checkstyle | LGPL 2 | http://checkstyle.sourceforge.net/
15+
Ebean Maven Enhancer | Apache License 2 | https://github.com/ebean-orm/avaje-ebeanorm-mavenenhancer
16+
FindBugs | LGPL | http://findbugs.sourceforge.net/
17+
Hamcrest | BSD 3 | https://github.com/hamcrest/JavaHamcrest/
18+
Jacoco | Eclipse Public License 1.0 | http://www.eclemma.org/jacoco/
19+
jUnit | Eclipse Public License 1.0 | https://github.com/junit-team/junit/
20+
JUnitParams | Apache License 2 | https://github.com/Pragmatists/JUnitParams
21+
Maven | Apache License 2 | http://maven.apache.org/
22+
Maven Checkstyle Plugin | Apache License 2 | https://maven.apache.org/plugins/maven-checkstyle-plugin/
23+
Maven Compiler Plugin | Apache License 2 | https://maven.apache.org/plugins/maven-compiler-plugin/
24+
Maven Failsafe Plugin | Apache License 2 | https://maven.apache.org/surefire/maven-failsafe-plugin/
25+
Maven Javadoc Plugin | Apache License 2 | https://maven.apache.org/plugins/maven-javadoc-plugin/
26+
Maven Release Plugin | Apache License 2 | https://maven.apache.org/maven-release/maven-release-plugin/
27+
Maven Resources Plugin | Apache License 2 | https://maven.apache.org/plugins/maven-resources-plugin/
28+
Maven Source Plugin | Apache License 2 | https://maven.apache.org/plugins/maven-source-plugin/
29+
Maven Surefire Plugin | Apache License 2 | https://maven.apache.org/surefire/maven-surefire-plugin/
30+
Maven Surefire Report Plugin | Apache License 2 | https://maven.apache.org/surefire/maven-surefire-report-plugin/
31+
Mockito | MIT | http://mockito.org/
32+
Wire Mock | Apache License 2 | http://wiremock.org/
33+
34+
35+
Compile Dependencies
36+
--------------------
37+
38+
Project | License | Project link
39+
-------------------------------|----------------------------|-------------
40+
Akka | Apache License 2 | http://akka.io
41+
Akka Persistence Cassandra | Apache License 2 | https://github.com/krasserm/akka-persistence-cassandra/
42+
Apache Commons Codec | Apache License 2 | https://commons.apache.org/proper/commons-codec/
43+
Apache HTTPComponents | Apache License 2 | http://hc.apache.org/
44+
Arp Networking Commons | Apache License 2 | https://github.com/ArpNetworking/commons
45+
Arp Networking Metrics Client | Apache License 2 | https://github.com/ArpNetworking/metrics-client-java
46+
Arp Networking JVM Extra | Apache License 2 | https://github.com/ArpNetworking/metrics-jvm-extra
47+
AspectJ | Eclipse Public License 1.0 | https://eclipse.org/aspectj
48+
cglib | Apache License 2 | http://cglib.sourceforge.net/
49+
Ebean | Apache License 2 | http://ebean-orm.github.io/
50+
Findbugs Annotations | LGPL | https://github.com/findbugsproject/findbugs
51+
Flyway | Apache License 2 | http://flywaydb.org/
52+
Guava | Apache License 2 | https://code.google.com/p/guava-libraries/
53+
Guice | Apache License 2 | https://code.google.com/p/google-guice/
54+
HikariCP | Apache License 2 | https://github.com/brettwooldridge/HikariCP
55+
JSR305 | BSD3 | https://code.google.com/p/jsr-305
56+
Jackson | Apache License 2 | http://jackson.codehaus.org/
57+
Javax Persistence API | CDDL | http://mvnrepository.com/artifact/javax.persistence/persistence-api
58+
Joda Time | Apache License 2 | http://www.joda.org/joda-time/
59+
LevelDB | BSD3 | https://github.com/google/leveldb
60+
Logback | Eclipse Public License 1.0 | http://logback.qos.ch/
61+
LogbackSteno | Apache License 2 | https://github.com/ArpNetworking/logback-steno
62+
LuaJ | MIT | https://sourceforge.net/projects/luaj
63+
Metrics Aggregator Protocol | Apache License 2 | https://github.com/ArpNetworking/metrics-aggregator-protocol
64+
Netty | Apache License 2 | http://netty.io
65+
Ning Async Http Client | Apache License 2 | https://github.com/ning/async-http-client
66+
OVal | Eclipse Public License 1.0 | http://oval.sourceforge.net/
67+
Play Framework | Apache License 2 | http://playframework.com
68+
Reflections | WTF Public License (WTFPL) | https://github.com/ronmamo/reflections
69+
Protocol Buffers | BSD 3 | https://code.google.com/p/protobuf/
70+
Scala Java8 Compatibility | Scala License | https://github.com/scala/scala-java8-compat
71+
Scala Lang | BSD3 | http://www.scala-lang.org/
72+
SignalFx Protoc | Apache License 2 | https://github.com/signalfx/signalfx-java
73+
SLF4J | MIT | http://www.slf4j.org/
74+
Vertx.io | Apache License 2 | http://vertx.io/
75+
76+
77+
© Groupon Inc., 2016

README.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
Metrics Cluster Aggregator
2+
==========================
3+
4+
Combines aggregate values from multiple TSD Aggregators into an aggregate. Simply, this means combining the values from your fleet.
5+
6+
7+
Setup
8+
-----
9+
10+
### Building ###
11+
12+
Prerequisites:
13+
* [JDK8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
14+
15+
Building:
16+
17+
metrics-cluster-aggregator> ./mvnw install
18+
19+
### Installing ###
20+
21+
The artifacts from the build are in *metrics-cluster-aggregator/target/appassembler* and should be copied to an appropriate directory on your application host(s).
22+
23+
### Execution ###
24+
25+
In the installation's *bin* directory there are scripts to start Metrics Cluster Aggregator: *metrics-cluster-aggregator* (Linux) and *metrics-cluster-aggregator.bat* (Windows). One of these should be executed on system start with appropriate parameters; for example:
26+
27+
/usr/local/lib/metrics-cluster-aggregator/bin/metrics-cluster-aggregator /usr/local/lib/metrics-cluster-aggregator/config/config.json
28+
29+
### Configuration ###
30+
31+
#### Logging ####
32+
33+
To customize logging you may provide a [LogBack](http://logback.qos.ch/) configuration file. To use a custom logging configuration you need to define and export an environment variable before executing *cluster-aggregator*:
34+
35+
export JAVA_OPTS="-Dlogback.configurationFile=/usr/local/lib/metrics-cluster-aggregator/config/logger.xml"
36+
37+
Where */usr/local/lib/metrics-cluster-aggregator/config/logger.xml* is the path to your logging configuration file.
38+
39+
#### Daemon ####
40+
41+
The Metrics Cluster Aggregator daemon configuration is specified in a JSON file. The location of the configuration file is passed to *metrics-cluster-aggregator* as a command line argument:
42+
43+
/usr/local/etc/metrics-cluster-aggregator/config/prod.conf
44+
45+
The configuration specifies:
46+
47+
* logDirectory - The location of additional logs. This is independent of the logging configuration.
48+
* pipelineConfiguration - The location of configuration file for the metrics pipeline.
49+
* httpHost - The ip address to bind the http server to.
50+
* httpPort - The port to bind the http server to.
51+
* aggregationHost - The ip address to bind the tcp aggregation server to.
52+
* aggregationPort - The port to bind the tcp aggregation server to.
53+
* maxConnectionTimeout - The maximum aggregation server client connection timeout in ISO-8601 period notation.
54+
* minConnectionTimeout - The minimum aggregation server client connection timeout in ISO-8601 period notation.
55+
* jvmMetricsCollectionInterval - The JVM metrics collection interval in ISO-8601 period notation.
56+
* rebalanceConfiguration - Configuration for aggregator shard rebalancing.
57+
* akkaConfiguration - Configuration of Akka.
58+
59+
For example:
60+
61+
```json
62+
{
63+
"logDirectory": "/usr/local/lib/metrics-cluster-aggregator/logs",
64+
"clusterPipelineConfiguration": "/usr/local/lib/metrics-cluster-aggregator/config/cluster-pipeline.json",
65+
"hostPipelineConfiguration": "/usr/local/lib/metrics-cluster-aggregator/config/host-pipeline.json",
66+
"httpPort": 7066,
67+
"httpHost": "0.0.0.0",
68+
"aggregationHost": "0.0.0.0",
69+
"aggregationPort": 7065,
70+
"maxConnectionTimeout": "PT2M",
71+
"minConnectionTimeout": "PT1M",
72+
"jvmMetricsCollectionInterval": "PT.5S",
73+
"rebalanceConfiguration": {
74+
"maxParallel": 100,
75+
"threshold": 500
76+
},
77+
"akkaConfiguration": {
78+
"akka": {
79+
"loggers": ["akka.event.slf4j.Slf4jLogger"],
80+
"loglevel": "DEBUG",
81+
"stdout-loglevel": "DEBUG",
82+
"logging-filter": "akka.event.slf4j.Slf4jLoggingFilter",
83+
"actor": {
84+
"debug": {
85+
"unhandled": "on"
86+
},
87+
"provider": "akka.cluster.ClusterActorRefProvider",
88+
"serializers": {
89+
"loggingJava": "com.arpnetworking.akka.LoggingSerializer"
90+
},
91+
"serialization-bindings" : {
92+
"\"com.arpnetworking.tsdcore.model.AggregatedData\"": "loggingJava"
93+
}
94+
},
95+
"cluster": {
96+
"seed-nodes": [
97+
"akka.tcp://[email protected]:2551"
98+
],
99+
"auto-down-unreachable-after": "300s"
100+
},
101+
"remote": {
102+
"log-remote-lifecycle-events": "on",
103+
"netty": {
104+
"tcp": {
105+
"hostname": "127.0.0.1",
106+
"port": 2551
107+
}
108+
}
109+
},
110+
"contrib": {
111+
"cluster": {
112+
"sharding": {
113+
"guardian-name": "sharding",
114+
"role": "",
115+
"retry-interval": "2 s",
116+
"buffer-size": 100000,
117+
"handoff-timeout": "60 s",
118+
"rebalance-interval": "10 s",
119+
"snapshot-interval": "720 s",
120+
"least-shard-allocation-strategy": {
121+
"rebalance-threshold": 10,
122+
"max-simultaneous-rebalance": 3
123+
}
124+
}
125+
}
126+
}
127+
}
128+
}
129+
}
130+
```
131+
132+
#### Pipeline ####
133+
134+
Metrics Cluster Aggregator supports a two pipelines. The first is the host pipeline which handles publication of all statistics received from Metrics Aggregator Daemon instances. The second is the cluster pipeline which handles all statistics (re)aggregated by cluster across host statistics from Metrics Aggregator Daemon instances. In both cases the pipeline defines one more destinations or sinks for the statistics.
135+
136+
For example:
137+
138+
```json
139+
{
140+
"sinks":
141+
[
142+
{
143+
"type": "com.arpnetworking.tsdcore.sinks.CarbonSink",
144+
"name": "my_application_carbon_sink",
145+
"serverAddress": "192.168.0.1"
146+
}
147+
]
148+
}
149+
```
150+
151+
License
152+
-------
153+
154+
Published under Apache Software License 2.0, see LICENSE
155+
156+
© Groupon Inc., 2014

findbugs.exclude.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!--
2+
~ Copyright 2015 Groupon.com
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
16+
<FindBugsFilter>
17+
18+
<!-- Match all DLS_DEAD_LOCAL_STORE violations. As per FindBugs
19+
documentation these generate numerous false positives under Sun/Oracle
20+
compilers.
21+
22+
http://findbugs.sourceforge.net/bugDescriptions.html#DLS_DEAD_LOCAL_STORE
23+
-->
24+
<Match>
25+
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
26+
</Match>
27+
28+
<!-- Match all RV_RETURN_VALUE_IGNORED_BAD_PRACTICE violations on all unit
29+
test files since Mockito usage can cause this violation when stating
30+
expectations.
31+
-->
32+
<Match>
33+
<Or>
34+
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
35+
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" />
36+
<Bug pattern="RR_NOT_CHECKED" />
37+
<Bug pattern="SR_NOT_CHECKED" />
38+
</Or>
39+
<Or>
40+
<Class name="~.*\.[^\.]+Test" />
41+
<Class name="~.*\.[^\.]+Test\$.*" />
42+
</Or>
43+
</Match>
44+
45+
<!-- Suppress bugs created by ebean model enhancement.
46+
-->
47+
<Match>
48+
<Or>
49+
<Bug pattern="EI_EXPOSE_REP" />
50+
<Bug pattern="MS_FINAL_PKGPROTECT" />
51+
<Bug pattern="SE_NO_SERIALVERSIONID" />
52+
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
53+
<Bug pattern="CI_CONFUSED_INHERITANCE" />
54+
</Or>
55+
<Or>
56+
<Class name="~com\.arpnetworking\.clusteraggregator\.models\.ebean.*" />
57+
</Or>
58+
</Match>
59+
60+
</FindBugsFilter>

maven/maven-wrapper.jar

70.2 KB
Binary file not shown.

maven/maven-wrapper.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Maven download properties
2+
#Thu Mar 24 22:08:56 UTC 2016
3+
distributionUrl=https\://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip

0 commit comments

Comments
 (0)