Enabled JMX in sink , added jmx-prometheus exporter, prometheus and grafana docker images.

This commit is contained in:
Kanthi Subramanian 2022-04-07 16:41:45 -04:00
parent ac5e468927
commit 41dce242c5
6 changed files with 9519 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
startDelaySeconds: 0
lowercaseOutputName: false
lowercaseOutputLabelNames: false
ssl: false
jmxUrl: service:jmx:rmi:///jndi/rmi://sink:39999/jmxrmi

View File

@ -0,0 +1,8 @@
global:
scrape_interval: 10s
evaluation_interval: 10s
scrape_configs:
- job_name: 'jmx'
static_configs:
- targets:
- jmx_exporter:9072

View File

@ -90,6 +90,7 @@ services:
ports:
- "18083:8083"
- "5005:5005"
- "39999:39999"
environment:
# Where to find Kafka broker
- BOOTSTRAP_SERVERS=kafka:9092
@ -105,6 +106,7 @@ services:
- JAVA_DEBUG_PORT=*:5005
- DEFAULT_JAVA_DEBUG_PORT=*:5005
- KAFKA_DEBUG=true
- JMX_PORT=39999
#- LOG_LEVEL=DEBUG
depends_on:
# - zookeeper
@ -128,6 +130,39 @@ services:
volumes:
- ../sql/init_clickhouse.sql:/docker-entrypoint-initdb.d/init_clickhouse.sql
##### MONITORING #####
#https://stackoverflow.com/questions/55473562/configuring-a-jmx-prometheus-exporter-docker-container-to-read-jmx-local-applica
# Bitnami bitnami/jmx-exporter vs sscaling images
jmx_exporter:
container_name: jmx_exporter
image: sscaling/jmx-prometheus-exporter
restart: "no"
ports:
- "9072:9072"
environment:
SERVICE_PORT: 9072
volumes:
- ../config/jmx-config.yml:/opt/jmx_exporter/config.yml
prometheus:
container_name: prometheus
image: bitnami/prometheus
restart: "no"
ports:
- "9090:9090"
volumes:
- ../config/prometheus.yml:/opt/bitnami/prometheus/conf/prometheus.yml
grafana:
container_name: grafana
image: grafana/grafana
restart: "no"
volumes:
- ../config/grafana/dashboards:/etc/grafana/provisioning/dashboards
ports:
- "3000:3000"
#### END OF MONITORING ###
bash:
container_name: bash
image: ubuntu

10
doc/Monitoring.md Normal file
View File

@ -0,0 +1,10 @@
Sink Connector Config
OpenJDK 11.0.14.1
-Xms256M, -Xmx2G,
JMX metrics of sink connector are exposed through the port
The JMX_exporter docker image scrapes the JMX metrics from the sink connector
The metrics can be read through the following URL
http://localhost:9072/metrics