The presentation belonging to the ALTEN Playground of november 2, 2017. More information on this playground can be found here: https://www.gitbook.com/book/matthijsmali/user-metrics/
7. Yes, why?
• Visualize user behavior
• What is the status of our usage Hypothesis?
• Is the application working as expected?
• Easy insight in technical logging
• Visually explore large datasets
17. Logs
• System logs
• System did what and when?
• Request logs
• User requested what and when?
• Event logs
• User did what without requesting something when?
• …
32. Hands-on
• Laptops ready & powered?
• Pair up if you feel that is necessary
• Working individually is also fine
• The ‘random’-logger we use is not similar to a real-life
situation. But gives a good idea.
33. Rough steps
1. Gathering information
2. Configure Filebeat (altenlogger)
3. Configure Logstash (elkx)
4. Restarting Logstash
5. Run Filebeat
6. Start logging
7. Create visualizations
8. Create a dashboard
34. Gathering information
Terminal 1
- docker run –d –name altenlogger:altenlogger tail –f
/dev/null
- Docker exec –it altenlogger /bin/bash -l
- Apt-get install net-tools
- Apt-get install vim
- Ifconfig (write down IP)
Terminal 2
- docker run –m4G -p 5601:5601 -p 9200:9200 -p 5044:5044 -p
9300:9300 -it --name elkx sebp/elkx
- Docker exec –it elkx /bin/bash –l
- Ifconfig (write down IP)
For linux users
35. Configure Filebeat (Altenlogger)
- vim /etc/filebeat/filebeat.yml
- Loglocatie: /tmp/testlogfiles/error/*.log
- Comment elasticsearch lines (92 – 100)
- Uncomment logstash and write down correct host (“x.x.x.x:5044”)
- Consider spacing and indenting while making edits.
36. Configure Logstash (elkx)
- Look at /etc/logstash/conf.d/ directory
- Pipeline, all files are executed
-vim /etc/logstash/conf.d/02-beats-input.conf
- Set SSL to false
- Save the document :wq
-cp 10-syslog.conf 12-altenlog.conf
-vim 12-altenlog.conf
41. Open Kibana
• Navigate to localhost:5601
• Login with elastic/changeme
• Create index pattern: “filebeat-*”
• Choose “timestamp” for Time Filter field name
• Click create
• See no data? Adjust time filter on the top right and set to
month to date
42. Discovering data
• Try some queries
• Username:Sydney
• Username:”Sydney” method:post
• Click Add Filter
• Choose response is 200
• Drag across time to zoom in
43. Visualize
• Demo
• Most Active Users
• Total amount of requests within selection
• Requests per day
44. Steps to create a dashboard
• Create new Visualization
• Choose type
• Choose index (filebeat-*)
• Choose aggregation
• Choose fields
• Press “Play button” and finetune
• Save Visualization
• Choose a good name, ie. “Altenlogger-ActiveUsers”
• Create new dashboard / Open dashboard
• Click edit > Add
• Choose visualizations to add
• Save dashboard
48. Configuring an open data set
• See Gitbook > Playing with other data
• Stop logstash service
• Import the CSV
• Logstash configuration
• Mutate data
• CSV imported as strings by default, but we need numbers
• Start Logstash service
• Check logging elastic / logstash for errors