Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #24 - Adding node exporter and telegraf to demo for collecting hardware and OS metrics #25

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 272 additions & 0 deletions docker-compose-influxdb-jaeger-telegraf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
version: '3'

services:
# Ocelot
## Serves as a collector for traces
agent:
image: inspectit/inspectit-ocelot-agent:${INSPECTIT_OCELOT_VERSION}
container_name: agent
deploy:
resources:
limits:
memory: 128M
volumes:
- agent-vol:/agent

## Fetches the configuration
ocelot-config-server:
image: inspectit/inspectit-ocelot-configurationserver:${INSPECTIT_OCELOT_VERSION}
container_name: ocelot-config-server
deploy:
resources:
limits:
memory: 512M
environment:
- INSPECTIT_CONFIG_SERVER_WORKING_DIRECTORY=/configuration-server
- INSPECTIT_CONFIG_SERVER_DEFAULT_USER_PASSWORD=demo
volumes:
- ./configuration-server:/configuration-server
ports:
- 8090:8090

## Self Monitoring
ocelot-eum-server:
image: inspectit/inspectit-ocelot-eum-server:${INSPECTIT_OCELOT_VERSION}
container_name: ocelot-eum-server
environment:
- INSPECTIT_EUM_SERVER_EXPORTERS_METRICS_INFLUX_URL=http://influxdb:8086
- INSPECTIT_EUM_SERVER_EXPORTERS_METRICS_INFLUX_DATABASE=inspectit_eum
- INSPECTIT_EUM_SERVER_EXPORTERS_TRACING_JAEGER_GRPC=jaeger:14250
deploy:
resources:
limits:
memory: 256M
volumes:
- ./eum-server:/eum-server
ports:
- 8085:8085

# Petclinic
config-server:
image: inspectit/spring-petclinic-config-server:${INSPECTIT_PETCLINIC_VERSION}
container_name: config-server
hostname: config-server
environment:
- INSPECTIT_SERVICE_NAME=config-server
- INSPECTIT_CONFIG_HTTP_URL=http://ocelot-config-server:8090/api/v1/agent/configuration
- INSPECTIT_EXPORTERS_METRICS_INFLUX_URL=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_JAEGER_URL=http://jaeger:14268/api/traces
deploy:
resources:
limits:
memory: 512M
depends_on:
- agent
- ocelot-config-server
entrypoint: ["./dockerize", "java", "-javaagent:/agent/inspectit-ocelot-agent.jar", "org.springframework.boot.loader.JarLauncher"]
volumes:
- agent-vol:/agent
ports:
- 8888:8888

discovery-server:
image: inspectit/spring-petclinic-discovery-server:${INSPECTIT_PETCLINIC_VERSION}
container_name: discovery-server
hostname: discovery-server
environment:
- INSPECTIT_SERVICE_NAME=discovery-server
- INSPECTIT_CONFIG_HTTP_URL=http://ocelot-config-server:8090/api/v1/agent/configuration
- INSPECTIT_EXPORTERS_METRICS_INFLUX_URL=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_JAEGER_URL=http://jaeger:14268/api/traces
deploy:
resources:
limits:
memory: 512M
depends_on:
- agent
- ocelot-config-server
- config-server
entrypoint: ["./dockerize","-wait=tcp://config-server:8888","-timeout=120s","--", "java", "-javaagent:/agent/inspectit-ocelot-agent.jar", "org.springframework.boot.loader.JarLauncher"]
volumes:
- agent-vol:/agent
ports:
- 8761:8761

customers-service:
image: inspectit/spring-petclinic-customers-service:${INSPECTIT_PETCLINIC_VERSION}
container_name: customers-service
hostname: customers-service
environment:
- INSPECTIT_SERVICE_NAME=customers-service
- INSPECTIT_CONFIG_HTTP_URL=http://ocelot-config-server:8090/api/v1/agent/configuration
- INSPECTIT_EXPORTERS_METRICS_INFLUX_URL=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_JAEGER_URL=http://jaeger:14268/api/traces
deploy:
resources:
limits:
memory: 512M
depends_on:
- agent
- ocelot-config-server
- config-server
- discovery-server
entrypoint: ["./dockerize","-wait=tcp://discovery-server:8761","-timeout=120s","--","java", "-javaagent:/agent/inspectit-ocelot-agent.jar", "org.springframework.boot.loader.JarLauncher"]
volumes:
- agent-vol:/agent
ports:
- 8081:8081

visits-service:
image: inspectit/spring-petclinic-visits-service:${INSPECTIT_PETCLINIC_VERSION}
container_name: visits-service
hostname: visits-service
environment:
- INSPECTIT_SERVICE_NAME=visits-service
- INSPECTIT_CONFIG_HTTP_URL=http://ocelot-config-server:8090/api/v1/agent/configuration
- INSPECTIT_EXPORTERS_METRICS_INFLUX_URL=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_JAEGER_URL=http://jaeger:14268/api/traces
deploy:
resources:
limits:
memory: 512M
depends_on:
- agent
- ocelot-config-server
- config-server
- discovery-server
entrypoint: ["./dockerize","-wait=tcp://discovery-server:8761","-timeout=120s","--","java", "-javaagent:/agent/inspectit-ocelot-agent.jar", "org.springframework.boot.loader.JarLauncher"]
volumes:
- agent-vol:/agent
ports:
- 8082:8082

vets-service:
image: inspectit/spring-petclinic-vets-service:${INSPECTIT_PETCLINIC_VERSION}
container_name: vets-service
hostname: vets-service
environment:
- INSPECTIT_SERVICE_NAME=vets-service
- INSPECTIT_CONFIG_HTTP_URL=http://ocelot-config-server:8090/api/v1/agent/configuration
- INSPECTIT_EXPORTERS_METRICS_INFLUX_URL=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_JAEGER_URL=http://jaeger:14268/api/traces
deploy:
resources:
limits:
memory: 512M
depends_on:
- agent
- ocelot-config-server
- config-server
- discovery-server
entrypoint: ["./dockerize","-wait=tcp://discovery-server:8761","-timeout=120s","--","java", "-javaagent:/agent/inspectit-ocelot-agent.jar", "org.springframework.boot.loader.JarLauncher"]
volumes:
- agent-vol:/agent
ports:
- 8083:8083

api-gateway:
image: inspectit/spring-petclinic-api-gateway:${INSPECTIT_PETCLINIC_VERSION}
container_name: api-gateway
hostname: api-gateway
environment:
- INSPECTIT_SERVICE_NAME=api-gateway
- INSPECTIT_CONFIG_HTTP_URL=http://ocelot-config-server:8090/api/v1/agent/configuration
- INSPECTIT_EXPORTERS_METRICS_INFLUX_URL=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_JAEGER_URL=http://jaeger:14268/api/traces
deploy:
resources:
limits:
memory: 512M
depends_on:
- agent
- ocelot-config-server
- config-server
- discovery-server
entrypoint: ["./dockerize","-wait=tcp://discovery-server:8761","-timeout=120s","--","java", "-javaagent:/agent/inspectit-ocelot-agent.jar", "org.springframework.boot.loader.JarLauncher"]
volumes:
- agent-vol:/agent
ports:
- 8080:8080

# Monitoring Backend

# Load Generator
## Artificial load on Demo
load:
image: inspectit/spring-petclinic-load:1.0
container_name: load-generator
hostname: load-generator

# InfluxDB
## Time Series Database
influxdb:
image: influxdb:1.8
container_name: influxdb
environment:
- INFLUXDB_HTTP_FLUX_ENABLED=true
- INFLUXDB_HTTP_LOG_ENABLED=false
- INFLUXDB_DATA_QUERY_LOG_ENABLED=false
deploy:
resources:
limits:
memory: 512M
volumes:
- ./influx:/docker-entrypoint-initdb.d
ports:
- 8086:8086

# Telegraf
## Collects OS and hardware metrics
telegraf:
image: telegraf
container_name: telegraf
restart: always
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
- influxdb
links:
- influxdb
ports:
- '8125:8125'

# Jaeger
## Collects and visualizes traces
jaeger:
image: jaegertracing/all-in-one:1.25.0
container_name: jaeger
ports:
- 16686:16686

# Grafana
## Dashboarding
grafana:
image: grafana/grafana:9.0.2
container_name: grafana
environment:
- GF_PANELS_DISABLE_SANITIZE_HTML=TRUE
- GF_SECURITY_ADMIN_PASSWORD=demo
- GF_PATHS_PROVISIONING=/usr/share/grafana/custom/
- GF_INSTALL_PLUGINS=https://github.com/NovatecConsulting/novatec-service-dependency-graph-panel/releases/download/v4.0.2/novatec-sdg-panel.zip;novatec-sdg-panel
volumes:
- ./grafana/provisioning/influxdb:/usr/share/grafana/custom/
- ./grafana/provisioning/home-dashboard/home.json:/usr/share/grafana/public/dashboards/home.json
ports:
- 3000:3000

# Grafana Loki & Promtail
## Make logs available in Grafana
loki:
image: grafana/loki:2.5.0
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml

promtail:
image: grafana/promtail:2.5.0
volumes:
- /var/log:/var/log
command: -config.file=/etc/promtail/config.yml

volumes:
agent-vol:
Loading