File tree 7 files changed +75
-13
lines changed
7 files changed +75
-13
lines changed Original file line number Diff line number Diff line change 1
1
# Application configuration file. See https://github.com/typesafehub/config/blob/master/HOCON.md for more details
2
2
HOSTNAME = "bh-laptop"
3
3
4
- topic_monitor.bootstrap_servers = "home-linux:9092"
5
- # topic_monitor.bootstrap_servers = "localhost:9092"
4
+ # topic_monitor.bootstrap_servers = "home-linux:9092"
5
+ topic_monitor.bootstrap_servers = "localhost:9092"
6
6
7
7
topic_monitor.application_id = "kafka_monitor"
8
8
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ metrics4j {
32
32
sinks {
33
33
kairos-telnet: {
34
34
_class: "org.kairosdb.metrics4j.sinks.TelnetSink"
35
- host: "kairos-server "
35
+ host: "localhost "
36
36
port: 4242
37
37
resolution: "MILLISECONDS"
38
38
}
@@ -44,12 +44,16 @@ metrics4j {
44
44
sources {
45
45
46
46
_collector: ["counter", "lastTime"]
47
- _formatter: "template"
48
47
_sink: "kairos-telnet"
49
48
49
+ java {
50
+ //jmx metrics are all under here if you want to turn them on.
51
+ _disabled: true
52
+ }
50
53
org {
51
54
kairosdb {
52
55
kafka {
56
+ _formatter: "template"
53
57
monitor {
54
58
ConsumerStats {
55
59
consumeCount {
Original file line number Diff line number Diff line change 1
- mvn clean package; mv target/* .jar target/dependency/
1
+ mvn clean package
2
+ cd target
3
+ tar -xf * .tar.gz
4
+
2
5
Original file line number Diff line number Diff line change 15
15
<!-- Startup class -->
16
16
<application .class>app.App</application .class>
17
17
18
- <jooby .version>3.0.9 </jooby .version>
18
+ <jooby .version>3.1.3 </jooby .version>
19
19
20
20
<maven .compiler.source>17</maven .compiler.source>
21
21
<maven .compiler.target>17</maven .compiler.target>
33
33
<dependency >
34
34
<groupId >ch.qos.logback</groupId >
35
35
<artifactId >logback-classic</artifactId >
36
- <version >1.5.3 </version >
36
+ <version >1.5.6 </version >
37
37
</dependency >
38
38
39
39
<dependency >
149
149
<plugin >
150
150
<groupId >com.fizzed</groupId >
151
151
<artifactId >stork-maven-plugin</artifactId >
152
- <version >3.0.0 </version >
152
+ <version >3.1.3 </version >
153
153
<executions >
154
154
<execution >
155
155
<id >stork-launcher</id >
162
162
<plugin >
163
163
<groupId >com.fizzed</groupId >
164
164
<artifactId >stork-maven-plugin</artifactId >
165
- <version >3.0.0 </version >
165
+ <version >3.1.3 </version >
166
166
<!-- configuration / execution (see below) -->
167
167
<executions >
168
168
<execution >
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ public App()
34
34
Properties props = new Properties ();
35
35
props .setProperty ("org.quartz.threadPool.threadCount" , "4" );
36
36
MetricsContext metricsContext = MetricSourceManager .getMetricConfig ().getContext ();
37
+ //install(new NullServer());
37
38
38
39
39
40
try
@@ -43,9 +44,9 @@ public App()
43
44
m_scheduler .setJobFactory (this );
44
45
45
46
install (new KTMGuiceModule (new KafkaModule ()));
46
- get ("/" , ctx -> "Welcome to Jooby!" );
47
+ // get("/", ctx -> "Welcome to Jooby!");
47
48
48
- onStarting (() ->
49
+ onStarted (() ->
49
50
{
50
51
metricsContext .registerTrigger ("kafka-monitor-trigger" , require (MetricsTrigger .class ));
51
52
metricsContext .addTriggerToPath ("kafka-monitor-trigger" , Collections .EMPTY_LIST );
Original file line number Diff line number Diff line change
1
+ package app ;
2
+
3
+
4
+ import edu .umd .cs .findbugs .annotations .NonNull ;
5
+ import io .jooby .Jooby ;
6
+ import io .jooby .Server ;
7
+ import io .jooby .ServerOptions ;
8
+
9
+ import java .util .ArrayList ;
10
+ import java .util .Collections ;
11
+ import java .util .List ;
12
+
13
+ public class NullServer extends Server .Base
14
+ {
15
+ private List <Jooby > m_applications = new ArrayList <>();
16
+
17
+ @ NonNull
18
+ @ Override
19
+ public Server setOptions (@ NonNull ServerOptions options )
20
+ {
21
+ return this ;
22
+ }
23
+
24
+ @ NonNull
25
+ @ Override
26
+ public String getName ()
27
+ {
28
+ return "NullServer" ;
29
+ }
30
+
31
+ @ NonNull
32
+ @ Override
33
+ public ServerOptions getOptions ()
34
+ {
35
+ return new ServerOptions ();
36
+ }
37
+
38
+ @ NonNull
39
+ @ Override
40
+ public Server start (@ NonNull Jooby application )
41
+ {
42
+ m_applications .add (application );
43
+ fireReady (m_applications );
44
+ return this ;
45
+ }
46
+
47
+ @ NonNull
48
+ @ Override
49
+ public Server stop ()
50
+ {
51
+ fireStop (m_applications );
52
+ return this ;
53
+ }
54
+ }
Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ working_dir_mode: APP_HOME
38
38
# Users can either entirely override it at runtime with the environment variable
39
39
# JAVA_ARGS or append extra arguments with the EXTRA_JAVA_ARGS enviornment variable
40
40
# or by passing them in on the command-line too.
41
- java_args : " -DMETRICS4J_CONFIG=conf/metrics4j.conf"
41
+ java_args : " -DMETRICS4J_CONFIG=conf/metrics4j.conf -Dlogback.configurationFile=conf/logback.xml "
42
42
43
43
# Minimum version of java required (system will be searched for acceptable jvm)
44
44
# Defaults to Java 1.6.
45
- min_java_version : " 1.8 "
45
+ min_java_version : " 17 "
46
46
47
47
# Maximum version of java required (system will be searched for acceptable jvm)
48
48
# Defaults to empty (all)
You can’t perform that action at this time.
0 commit comments