Monitor your Spring Boot application with the Elastic Stack all around
MIT License
Monitor logs, metrics, pings, and traces of your distributed (micro-) services. There are also slides walking you through the features of this repository.
proc
enrichment for nginx, Java, and MySQL. Optionally show the [Packetbeat] TLS Sessions and [Packetbeat] DNS Tunneling dashboards as well.json.name
and the context view for one log message. Let attendees hit /bad and /null to show the stacktrace both in the JSON log file and in Kibana by filtering down on application:java
and json.severity: ERROR
. Also point out the cloud meta.*
and host.*
information. And show the json.stack_hash
, which you can use for visualizations too.ansible-playbook restart_frontend.yml
or do it manually and see the change.admin
and secret
). Then collect the same information with Metricbeat's HTTP module and show it in Kibana's Discover tab.jolokia.metrics.memory.heap_usage.used
divided by the max of jolokia.metrics.memory.heap_usage.max
../ab.sh
on the monitor instance. Also show errors and metrics.If the network connection is decent, show it on Amazon Lightsail. Otherwise fall back to the local setup and have all the dependencies downloaded in advance.
Make sure you have run this before the demo, because some steps take time and require a decent internet connection.
AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
. Protip: Use https://github.com/sorah/envchain to keep your environment variables safe.elastic_version
, enable Kibana, enable APM, and set the environment variables with the values for ELASTICSEARCH_HOST
, ELASTICSEARCH_USER
, ELASTICSEARCH_PASSWORD
, KIBANA_HOST
, KIBANA_ID
, APM_HOST
, and APM_TOKEN
.TF_VAR_zone_id
. If you haven't created the Hosted Zone yet, you should set it up in the AWS Console first and then set the environment variable.terraform init
first. Then create the keypair, DNS settings, and instances with terraform apply
.ansible-playbook configure_all.yml
.ansible-playbook configure_backend.yml
.ansible-playbook deploy_backend.yml
and ansible-playbook deploy_frontend.yml
(Ansible is also building them).When you are done, remove the instances, DNS settings, and key with terraform destroy
.
Very similar to the Lightsail setup above. The main difference is that everything is running on one instance and you need to open the port 5601 for Kibana (Elasticsearch, APM,... are only accessible on localhost) and 88 if you want to include the PHP examples.
Credentials:
ssh elastic-admin@workshop-<number>.xeraa.wtf
elastic-admin / secrethttp://localhost:9200
admin / secrethttp://workshop-<number>.xeraa.wtf:5601
admin / secretMake sure you have run this before the demo, because some steps take time and require a decent internet connection.
docker-compose up
, which will bring up Elasticsearch, Kibana, and all the Beats../gradle bootRun
.When you are done, stop the Java applications and remove the Docker setup with docker-compose down -v
.