07. Monitoring Review & Practice
Pro Tips on Using the ELK Stack
Pro Tips on Using the ELK Stack
The ELK stack requires more memory than everything else in this course.
- The standard config recommends 2GB. This is why we migrate to a larger instance.
- It may also be necessary to stop anything else that you have set up in this course (i.e. Jenkins, Prometheus, and Grafana).
- If the Ansible installation script for Elasticsearch takes too long (more than 5 minutes for a single item) you may have run out of memory.
- Do not be alarmed, just restart the EC2 instance either through the command line, or if necessary in the AWS web console.
Monitoring Further Research
Further Reading on Monitoring
To learn how to set up alerts and notifications with ELK stack, please refer to the following:
Monitoring Quiz
SOLUTION:
Elastic Search, Logstash, KibanaPractice Exercise 1
Practice your Skills with Monitoring! - Practice Exercise 1
- Migrate your AWS instance to a T2.medium
- Set up Prometheus and configure a node exporter
https://github.com/cloudalchemy/ansible-prometheus
curl -LO https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.1.4_am - Install Grafana and configure it to connect to your Prometheus backend
- Take a screenshot of your Grafana graph, and compare it to mine below
Practice Exercise 1 Screenshot
Screenshot of my Grafana Graph
Practice Exercise 2
Practice Exercise 2
- Set up ELK stack and all of its components (note: upgrade the version of Elasticsearch in Ansible, or do an apt install logstash to match those for Logstash and Kibana)
https://github.com/elastic/ansible-elasticsearch - Now compare your screen of Kibana showing logs from your system to mine below. They should be similar.
Exercise 2 Screenshot
My Kibana screen showing logs from my system