Through this session, I would like to present the various aspects to consider whenever we are about to automate a manual task using scripts. This Session automates the creation of visualization and dashboards over Kibana and will cover the testing part of scripts which will ensure that your script is dependable.
2. Agenda
1. What is Kibana?
2. The Manual Job
3. How can you Automate It?
4. Are You Sure… It will work?
5. Convince yourself that It will.
6. Demo
3. What is Kibana
● Open source analytics and visualization platform.
● Works with Elasticsearch(ES).
● Use Kibana to:
○ View, search and Interact with data in Elasticsearch indices.
4. The Manual Job
- Creating visualizations and Dashboards through the GUI.
- Once the visuals and dashs are up. We would like to replicate the same for
different environment by copying the dashs and visuals and changing one or
two key query elements.
- Exporting the selected visuals and dashs to a different Kibana.
5. What IF...
1. ES goes down?
2. Kibana Index is deleted?
3. You have multiple environments to replicate stuff.
6. How to Automate It
Asking Questions:
- What’s the manual flow?
- Choice of Tool - Bash, Python or Ansible.
- Nature of Tasks - Non-dependent or Dependent.
- What Info to expose?
- Responsibility if automation failed.
7. How to Automate It
Answering Questions:
- What’s the manual flow?
- GUI based but..
- ES API’s Document API lets us put dash and visuals in json format.
- Choice of Tool - Bash, Python or Ansible:
- Using Python (Why not Bash or Ansible).
8. How to Automate It
- Nature of Tasks - Non-dependent or Dependent
- Dependent.
- Exposing Info
- ”Giving Just Enough to Use, Not too much to Abuse.”
- Status info.
- Response to verify success failure.
- Logs.
10. Convince… Yourself
● Devise solutions for HPTF.
● Make your script catch SPTF:
○ Provided Debug info.
○ Provide enough info for end user to understand.
● Testing your script:
○ Depends upon your script language.
○ Write test-cases for functionality which is static.
○ You can’t always test everything in scripting.