Skip to content

Commit

Permalink
Enabling self-monitoring in demo scenarios (inspectIT#114)
Browse files Browse the repository at this point in the history
(cherry picked from commit a99ce27)
  • Loading branch information
AlexanderWert authored and JonasKunz committed Feb 28, 2019
1 parent 0b262f8 commit 8b613a7
Show file tree
Hide file tree
Showing 17 changed files with 16,836 additions and 203 deletions.
9 changes: 7 additions & 2 deletions inspectit-oce-demo/agentconfig/api-gateway/config.yml
@@ -1,4 +1,9 @@
# See https://github.com/inspectIT/inspectit-oce/blob/0.1.M1/inspectit-oce-core/src/main/resources/config/default.yml
# for all the configuration options.


inspectit:
self-monitoring:
enabled: true
metrics:
# root setting for the polling frequency of all metrics
# when a metrics has no frequency defined separately, this frequency will be used
frequency: 1s
9 changes: 8 additions & 1 deletion inspectit-oce-demo/agentconfig/config-server/config.yml
@@ -1,2 +1,9 @@
# See https://github.com/inspectIT/inspectit-oce/blob/0.1.M1/inspectit-oce-core/src/main/resources/config/default.yml
# for all the configuration options.
# for all the configuration options.
inspectit:
self-monitoring:
enabled: true
metrics:
# root setting for the polling frequency of all metrics
# when a metrics has no frequency defined separately, this frequency will be used
frequency: 1s
43 changes: 33 additions & 10 deletions inspectit-oce-demo/agentconfig/customers-service/config.yml
@@ -1,13 +1,36 @@
# See https://github.com/inspectIT/inspectit-oce/blob/0.1.M1/inspectit-oce-core/src/main/resources/config/default.yml
# for all the configuration options.
inspectit:
self-monitoring:
enabled: true
logging:
debug: true
config:
file-based:
frequency: 1s

instrumentation:
# # settings for special sensors
# special:
# # enables or disables the instrumentation to ensure context propagation across java.util.concurrent.Executor instances
# executor-context-propagation: true
# # enables or disables the instrumentation to ensure context propagation across java.lang.Thread instances
# thread-start-context-propagation: true
# # settings for fine-tuning the instrumentation process
# internal:
# # the time to pause between executing batches of class instrumentation updates
# inter-batch-delay: 1s
# # defines how many classes are checked at once for updates of their configuration
# class-configuration-check-batch-size: 100
# # defines the maximum number of classes which are retransformed at once per batch
# class-retransform-batch-size: 10
#
# # defines how often the agent should check if new classes have been defined.
# # this check is only performed if Classloader.defineClass was called less than ${max-class-definition-delay} seconds ago
# new-class-discovery-interval: 10s
# # defines how often after the last invocation of a ClassFileTransformer the agent scans for new classes
# num-class-discovery-trials: 2
# # general settings regarding metrics capturing
scopes:
servlet_service:
interfaces:
Expand All @@ -16,14 +39,14 @@ inspectit:
- name: service
advanced:
instrument-only-inherited-methods: true

methods_with_request_mapping:
methods:
- annotations:
- name: org.springframework.web.bind.annotation.GetMapping
advanced:
disable-safety-mechanisms: true

dataproviders:
get_bt_from_request_mapping:
imports:
Expand All @@ -32,7 +55,7 @@ inspectit:
methodName: String
clazz: Class
parameterTypes: Class[]
value-body: |
value-body: |
GetMapping gm = (GetMapping) (clazz.getDeclaredMethod(methodName,parameterTypes).getAnnotation(GetMapping.class));
return gm.value()[0];
get_request_servlet_path:
Expand All @@ -51,7 +74,7 @@ inspectit:
val1: Object
val2: Object
value: "val1==null? val2 : val1"

rules:
servlet_service:
scopes: {servlet_service : true}
Expand All @@ -60,9 +83,9 @@ inspectit:
temp: {provider: get_request_servlet_path}
business_transaction:
provider: get_first_non_null
data-input:
data-input:
val1: business_transaction
constant-input:
constant-input:
val2: "other"

exit:
Expand All @@ -72,7 +95,7 @@ inspectit:
sinceNanos: method_entry_time
metrics:
'[http/responsetime]' : method_duration

fetch_bt_from_request_mapping:
scopes: {methods_with_request_mapping : true}
entry:
Expand All @@ -90,9 +113,9 @@ inspectit:
'[http/responsetime]':
unit: ms
views:
'[http/responsetime/count]':
'[http/responsetime/count]':
aggregation: COUNT
tags: {business_transaction: true}
'[http/responsetime/sum]':
'[http/responsetime/sum]':
aggregation: SUM
tags: {business_transaction: true}
9 changes: 8 additions & 1 deletion inspectit-oce-demo/agentconfig/discovery-server/config.yml
@@ -1,2 +1,9 @@
# See https://github.com/inspectIT/inspectit-oce/blob/0.1.M1/inspectit-oce-core/src/main/resources/config/default.yml
# for all the configuration options.
# for all the configuration options.
inspectit:
self-monitoring:
enabled: true
metrics:
# root setting for the polling frequency of all metrics
# when a metrics has no frequency defined separately, this frequency will be used
frequency: 1s
25 changes: 15 additions & 10 deletions inspectit-oce-demo/agentconfig/vets-service/config.yml
@@ -1,12 +1,14 @@
# See https://github.com/inspectIT/inspectit-oce/blob/0.1.M1/inspectit-oce-core/src/main/resources/config/default.yml
# for all the configuration options.
inspectit:
self-monitoring:
enabled: true
logging:
debug: true
config:
file-based:
frequency: 1s

instrumentation:
scopes:
servlet_service:
Expand All @@ -16,14 +18,14 @@ inspectit:
- name: service
advanced:
instrument-only-inherited-methods: true

methods_with_request_mapping:
methods:
- annotations:
- name: org.springframework.web.bind.annotation.GetMapping
advanced:
disable-safety-mechanisms: true

dataproviders:
get_bt_from_request_mapping:
imports:
Expand All @@ -32,7 +34,7 @@ inspectit:
methodName: String
clazz: Class
parameterTypes: Class[]
value-body: |
value-body: |
GetMapping gm = (GetMapping) (clazz.getDeclaredMethod(methodName,parameterTypes).getAnnotation(GetMapping.class));
return gm.value()[0];
get_request_servlet_path:
Expand All @@ -51,7 +53,7 @@ inspectit:
val1: Object
val2: Object
value: "val1==null? val2 : val1"

rules:
servlet_service:
scopes: {servlet_service : true}
Expand All @@ -60,9 +62,9 @@ inspectit:
temp: {provider: get_request_servlet_path}
business_transaction:
provider: get_first_non_null
data-input:
data-input:
val1: business_transaction
constant-input:
constant-input:
val2: "other"

exit:
Expand All @@ -72,7 +74,7 @@ inspectit:
sinceNanos: method_entry_time
metrics:
'[http/responsetime]' : method_duration

fetch_bt_from_request_mapping:
scopes: {methods_with_request_mapping : true}
entry:
Expand All @@ -86,13 +88,16 @@ inspectit:
is-tag: false

metrics:
# root setting for the polling frequency of all metrics
# when a metrics has no frequency defined separately, this frequency will be used
frequency: 1s
definitions:
'[http/responsetime]':
unit: ms
views:
'[http/responsetime/count]':
'[http/responsetime/count]':
aggregation: COUNT
tags: {business_transaction: true}
'[http/responsetime/sum]':
'[http/responsetime/sum]':
aggregation: SUM
tags: {business_transaction: true}
25 changes: 15 additions & 10 deletions inspectit-oce-demo/agentconfig/visits-service/config.yml
@@ -1,12 +1,14 @@
# See https://github.com/inspectIT/inspectit-oce/blob/0.1.M1/inspectit-oce-core/src/main/resources/config/default.yml
# for all the configuration options.
inspectit:
self-monitoring:
enabled: true
logging:
debug: true
config:
file-based:
frequency: 1s

instrumentation:
scopes:
servlet_service:
Expand All @@ -16,14 +18,14 @@ inspectit:
- name: service
advanced:
instrument-only-inherited-methods: true

methods_with_request_mapping:
methods:
- annotations:
- name: org.springframework.web.bind.annotation.GetMapping
advanced:
disable-safety-mechanisms: true

dataproviders:
get_bt_from_request_mapping:
imports:
Expand All @@ -32,7 +34,7 @@ inspectit:
methodName: String
clazz: Class
parameterTypes: Class[]
value-body: |
value-body: |
GetMapping gm = (GetMapping) (clazz.getDeclaredMethod(methodName,parameterTypes).getAnnotation(GetMapping.class));
return gm.value()[0];
get_request_servlet_path:
Expand All @@ -51,7 +53,7 @@ inspectit:
val1: Object
val2: Object
value: "val1==null? val2 : val1"

rules:
servlet_service:
scopes: {servlet_service : true}
Expand All @@ -60,9 +62,9 @@ inspectit:
temp: {provider: get_request_servlet_path}
business_transaction:
provider: get_first_non_null
data-input:
data-input:
val1: business_transaction
constant-input:
constant-input:
val2: "other"

exit:
Expand All @@ -72,7 +74,7 @@ inspectit:
sinceNanos: method_entry_time
metrics:
'[http/responsetime]' : method_duration

fetch_bt_from_request_mapping:
scopes: {methods_with_request_mapping : true}
entry:
Expand All @@ -86,13 +88,16 @@ inspectit:
is-tag: false

metrics:
# root setting for the polling frequency of all metrics
# when a metrics has no frequency defined separately, this frequency will be used
frequency: 1s
definitions:
'[http/responsetime]':
unit: ms
views:
'[http/responsetime/count]':
'[http/responsetime/count]':
aggregation: COUNT
tags: {business_transaction: true}
'[http/responsetime/sum]':
'[http/responsetime/sum]':
aggregation: SUM
tags: {business_transaction: true}
12 changes: 6 additions & 6 deletions inspectit-oce-demo/docker-compose-elastic.yml
Expand Up @@ -40,7 +40,7 @@ services:
- agent
- config-server
entrypoint: ["sh", "-c","
./dockerize -wait=tcp://config-server:8888 -timeout=60s -- &&
./dockerize -wait=tcp://config-server:8888 -timeout=120s -- &&
java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
-javaagent:/agent/inspectit-oce-agent.jar
-jar /app.jar"]
Expand All @@ -64,7 +64,7 @@ services:
- config-server
- discovery-server
entrypoint: ["sh", "-c","
./dockerize -wait=tcp://discovery-server:8761 -timeout=60s -- &&
./dockerize -wait=tcp://discovery-server:8761 -timeout=120s -- &&
java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
-javaagent:/agent/inspectit-oce-agent.jar
-jar /app.jar"]
Expand All @@ -88,7 +88,7 @@ services:
- config-server
- discovery-server
entrypoint: ["sh", "-c","
./dockerize -wait=tcp://discovery-server:8761 -timeout=60s -- &&
./dockerize -wait=tcp://discovery-server:8761 -timeout=120s -- &&
java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
-javaagent:/agent/inspectit-oce-agent.jar
-jar /app.jar"]
Expand All @@ -112,7 +112,7 @@ services:
- config-server
- discovery-server
entrypoint: ["sh", "-c","
./dockerize -wait=tcp://discovery-server:8761 -timeout=60s -- &&
./dockerize -wait=tcp://discovery-server:8761 -timeout=120s -- &&
java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
-javaagent:/agent/inspectit-oce-agent.jar
-jar /app.jar"]
Expand All @@ -136,7 +136,7 @@ services:
- config-server
- discovery-server
entrypoint: ["sh", "-c","
./dockerize -wait=tcp://discovery-server:8761 -timeout=60s -- &&
./dockerize -wait=tcp://discovery-server:8761 -timeout=120s -- &&
java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
-javaagent:/agent/inspectit-oce-agent.jar
-jar /app.jar"]
Expand All @@ -162,7 +162,7 @@ services:


telegraf:
image: telegraf
image: telegraf:1.9.4
container_name: telegraf
volumes:
- ./telegraf/telegraf-elastic.conf:/etc/telegraf/telegraf.conf:ro
Expand Down

0 comments on commit 8b613a7

Please sign in to comment.