Load testing ElasticSearch using ESRally and viewing the results in Kibana
Run EsRally against an existing ElasticSeach index and save the results in Kibana
Problem:
- Need to be able to write json queries and run these against an existing ES cluster
- Want to be able to view the EsRally results in a local ES instance
- The test run results to be available in Kibana
Required to be installed:
1. Get and build the ELK stack to store the test results against. Also defines the network so the docker containers can talk to each other.
- docker pull sebp/elk
- git clone https://github.com/spujadas/elk-docker.git && cd elk-docker
- docker build -t sebp/elk .
- docker network create --subnet=172.18.0.0/16 elastic-esrally-network
- docker run --rm --net elastic-esrally-network --ip 172.18.0.5 -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk
Local Kibana
Local ElasticSearch (Chrome plugin is recommended for viewing ES info)
2. Now we have ES and Kibana running its time to get ES rally sorted:
Pull the docker image / ESRally configuration files in a new terminal window- docker pull ducas/elastic-rally:0.11.0
- git clone https://github.com/sgriffiths/Esrally-ElasticSearch.git && cd Esrally-ElasticSearch
3. Create a test product index by going to Kibana dev tools and entering a PUT query:
Kibana dev tools:
PUT product
{
"settings" : {
"index" : {
"number_of_shards" : 3,
"number_of_replicas" : 2
}
}
}
NOTE: To point to a remote ES instance just update the IP address in the .env file.
4. Run EsRally
- docker-compose run product
Results will be published to the results folder (product_result.md)
Should look something like:
Go to 'Discover' and view the metrics/results:
5. After the run check the results have been published to ElasticSearch:
Local ElasticSearchShould look something like:
6. Define and create the index patten in Kibana management/Indexpatterns and use the @timestamp.
Below contains information relevant to the different files and configuration:
* The examples are based on searching for food products on a website similar to the following:
Tracks
Where you call the configuration files for the challenges and operations, these can be defined here but it makes the code a little easier to understand when its been separated
1. Create the track:
- Here we import 'rally helpers' to allow us to define where the operations and challengers are located
- You can however define all the operations and challenges in the track.json if required
- We isolate these files separately make it more efficient and manageable when you have lots of operation (json query) files.
2. Operations:
- This is where we define the query to be executed in this case its just looking for 'family' of products to be returned
- There can be and usually is multiple of these files in the operations folder (or whatever you call it). These get excused by calling 'challenge' methods
3. Challenges:
- This does a check on the cluster health to make sure its green
- Parallel has been used so that multiple 'tasks' can be run inside this block at once
- Variables have been used for clients, duration and throughput which can then be defined at runtime.. The value to the right is the default if nothing is defined
4. Rally.ini
- datastore.host is the IP of local ElasticSearch instance where the EsRally test files will be indexed
- If you use X-Pack then the user and password will need to be defined here for basic auth
Creating additional tests:
You would add additional files to the operations directory and then reference these from the 'parallel.json' file
Really good job, this is a very approach to me and very interesting post.
ReplyDeleteI hope more different tips from your wonderful blog...!
Power BI Training in Chennai
Power BI Training Fees in Chennai
Tableau Training in Chennai
Spark Training in Chennai
Oracle Training in Chennai
Unix Training in Chennai
Oracle DBA Training in Chennai
Social Media Marketing Courses in Chennai
Pega Training in Chennai
Primavera Training in Chennai
Great Article. Thank you for sharing! Really an awesome post for every one.
ReplyDeleteIEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.
Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai
Your article is worth reading! You are providing a lot of valid information.This'll be really helpful for my reference. Do share more such articles.
ReplyDeleteAWS Training center in Chennai
AWS Classes in Chennai
AWS training fees in Chennai
R Training in Chennai
Data Science Training in Chennai
AWS Training in Anna nagar
AWS Training in OMR
AWS Training in Porur
Thanks for sharing this post and the efforts you have made in writing this. If you have more info about Software testing companies, please share. I looking forward to hearing from you.
ReplyDeleteIt’s really amazing to get this blog and information in this blog may give the right information…!!
ReplyDeleteTally Classes in Chennai
CCNA Training in Chennai
SEO Course in Chennai
Big Data Training in Chennai
Cloud Computing Courses in Chennai
Blue Prism Training Chennai
You've shared some excellent material Software development experts in Noida Uttar Pradesh. I'm grateful for this post because it contains a lot of useful information. Thank you for sharing this piece of writing.
ReplyDeleteCasino Tycoon 2 - Mapyro
ReplyDeleteCasino Tycoon 2 구리 출장샵 【67K+】 부산광역 출장안마 【67K+】 청주 출장마사지 【67K+】 Casino Tycoon 2 in New York, 여주 출장샵 NY. View our Map. View rates, hours, 충주 출장안마 directions,