{"id":1736,"date":"2016-04-11T16:59:23","date_gmt":"2016-04-11T20:59:23","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?p=1736"},"modified":"2016-04-11T16:59:23","modified_gmt":"2016-04-11T20:59:23","slug":"log-file-cloud-testing-with-jmeter-accesslogsampler","status":"publish","type":"post","link":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/","title":{"rendered":"Log File Cloud Testing With JMeter AccessLogSampler"},"content":{"rendered":"<p>Typically, whether we are starting a load test or developing a strategy used for load testing, we often come to wonder about the specifics of the user\u2019s usage patterns. \u201cWhat exactly are users doing once they\u2019re on our website?\u201d, is a very common question that we often hear. Thankfully, web server access logs can help us answer this question and others due to the fact that these logs contain a range of information like HTTP requests, images, CSS, java scripts, and detailed session information, among other things. Even when patterns in traffic change, these access logs record everything from the individual changes to various shifts with general use.<\/p>\n<p>RedLine13 recently launched <a href=\"https:\/\/www.redline13.com\/blog\/2016\/04\/load-test-with-apache-or-nginx-log-file-replay\/\" target=\"_blank\" rel=\"noopener\">Simple Apache &amp; NGINX Log File Replay<\/a>, but JMeter users already\u00a0have this capability allowing them to create more robust performance test plans. The JMeter Access Log Sampler has been designed to not only read access logs, but to also generate HTTP requests as well which, in turn, simulates production traffic for our load tests. If you were to generate realistic loads and be able to profile applications and their bottlenecks, you will then be able to play this back on your live server logs on various test machines. Now access logs may not always entirely be useful, as is the case with those that have numerous forms and POST requests, however for websites that mainly utilize GETs, you are able to mimic live traffic with great detail.<\/p>\n<p>(If you want to read more about the Access Log Sampler, refer to <a href=\"https:\/\/jmeter.apache.org\/usermanual\/jmeter_accesslog_sampler_step_by_step.pdf\" target=\"_blank\" rel=\"noopener\">JMeter\u2019s step-by-step guide<\/a> and their <a href=\"http:\/\/jmeter.apache.org\/usermanual\/component_reference.html#Access_Log_Sampler\" target=\"_blank\" rel=\"noopener\">component reference for Access Log Sampler<\/a>)<\/p>\n<p><em>Figure 1:<\/em><a href=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper.png\" rel=\"attachment wp-att-1740\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1740\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper.png\" alt=\"AccessLogSamper\" width=\"2510\" height=\"920\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper.png 2510w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper-300x110.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper-1024x375.png 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper-768x281.png 768w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper-1536x563.png 1536w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper-2048x751.png 2048w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper-1568x575.png 1568w\" sizes=\"auto, (max-width: 2510px) 100vw, 2510px\" \/><\/a><strong>Server:\u00a0<\/strong>Domain name or the IP address of the web server. All requests will be prefixed with this.<\/p>\n<p><strong>Port:\u00a0<\/strong>Port the web server is listening to. Also used in forming the proper request URL.<\/p>\n<p><strong>Parse Images:<\/strong>\u00a0Not implemented.<\/p>\n<p><strong>Log Parser Class: <\/strong>The log parser class is responsible for parsing the logs.<\/p>\n<ul>\n<li>TCLogParser &#8211; Processes access log on each thread<\/li>\n<li>SharedTCLogParser &#8211; Processes log file across many threads<\/li>\n<li>OrderPreservingLogParser &#8211; Processes log file across thread where each thread gets\u00a0entries in log based on order.<\/li>\n<\/ul>\n<p><strong>Filter:\u00a0<\/strong>The filter class is used to filter out\u00a0or enhance\u00a0requests.<\/p>\n<ul>\n<li>LogFilter: Not Implemented<\/li>\n<li>SessionFilter: Each log entry has cookies sent which are parsed from the log file. Then the session filter will send them along with requests so the GET will be exactly the same as a real call.<\/li>\n<\/ul>\n<p><strong>Log File Location<\/strong><strong>:\u00a0<\/strong>Location of the access log file.<\/p>\n<ul>\n<li>In\u00a0Figure 1, beanshell method\u00a0(\u201c<i>${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}\u201d<\/i>) is used to get the base directory of the script.<\/li>\n<\/ul>\n<p><strong>JMeter\u00a0Note about Log Format<\/strong><\/p>\n<ul>\n<li>Log file must be in <a href=\"https:\/\/commons.apache.org\/proper\/commons-logging\/\" target=\"_blank\" rel=\"noopener\">Apache Commons Logging<\/a> format which is used by many application and web servers.<\/li>\n<li>Your threads * loop count must be set properly to allow for each request from the log file to be replayed.\n<ul>\n<li>If your log file has 100 samples and you have\u00a010 threads with loop of 5 only 50 requests will be made.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>For more, you can <a href=\"https:\/\/www.redline13.com\/LoadTest\/View\/26400\" target=\"_blank\" rel=\"noopener\">download an example test plan<\/a> we have set up with our free load testing service that uses the NGINX log file of a web server to generate a load test on an external website.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1746\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/RedLine13-JMeter-LogFile-Sampler.png\" alt=\"RedLine13 JMeter LogFile Sampler\" width=\"995\" height=\"809\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/RedLine13-JMeter-LogFile-Sampler.png 995w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/RedLine13-JMeter-LogFile-Sampler-300x244.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/RedLine13-JMeter-LogFile-Sampler-768x624.png 768w\" sizes=\"auto, (max-width: 995px) 100vw, 995px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Typically, whether we are starting a load test or developing a strategy used for load testing, we often come to wonder about the specifics of the user\u2019s usage patterns. \u201cWhat exactly are users doing once they\u2019re on our website?\u201d, is a very common question that we often hear. Thankfully, web server access logs can help us answer this question and others due to the fact that these logs contain a range of information like HTTP requests,<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7,37],"tags":[74,75,331,363],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-user","4":"post-1736","6":"format-standard","7":"category-blog","8":"category-jmeter","9":"category-logfile","10":"post_tag-apache-httpd","11":"post_tag-apache-jmeter","12":"post_tag-log-file-load-testing","13":"post_tag-nginx"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Log File Cloud Testing With JMeter AccessLogSampler - RedLine13<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Log File Cloud Testing With JMeter AccessLogSampler - RedLine13\" \/>\n<meta property=\"og:description\" content=\"Typically, whether we are starting a load test or developing a strategy used for load testing, we often come to wonder about the specifics of the user\u2019s usage patterns. \u201cWhat exactly are users doing once they\u2019re on our website?\u201d, is a very common question that we often hear. Thankfully, web server access logs can help us answer this question and others due to the fact that these logs contain a range of information like HTTP requests,Read More &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-11T20:59:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper.png\" \/>\n<meta name=\"author\" content=\"RedLine13\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"RedLine13\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/\"},\"author\":{\"name\":\"RedLine13\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28\"},\"headline\":\"Log File Cloud Testing With JMeter AccessLogSampler\",\"datePublished\":\"2016-04-11T20:59:23+00:00\",\"dateModified\":\"2016-04-11T20:59:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/\"},\"wordCount\":541,\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"keywords\":[\"apache httpd\",\"apache jmeter\",\"Log File Load Testing\",\"NGINX\"],\"articleSection\":[\"Blog\",\"JMeter\",\"LogFile Replay\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/\",\"name\":\"Log File Cloud Testing With JMeter AccessLogSampler - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2016-04-11T20:59:23+00:00\",\"dateModified\":\"2016-04-11T20:59:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Log File Cloud Testing With JMeter AccessLogSampler\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"name\":\"RedLine13\",\"description\":\"(Almost) Free Load Testing in the Cloud\",\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.redline13.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\",\"name\":\"RedLine13\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"contentUrl\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"width\":300,\"height\":68,\"caption\":\"RedLine13\"},\"image\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28\",\"name\":\"RedLine13\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g\",\"caption\":\"RedLine13\"},\"sameAs\":[\"http:\/\/127.0.0.1\"],\"url\":\"https:\/\/www.redline13.com\/blog\/author\/user\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Log File Cloud Testing With JMeter AccessLogSampler - RedLine13","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/","og_locale":"en_US","og_type":"article","og_title":"Log File Cloud Testing With JMeter AccessLogSampler - RedLine13","og_description":"Typically, whether we are starting a load test or developing a strategy used for load testing, we often come to wonder about the specifics of the user\u2019s usage patterns. \u201cWhat exactly are users doing once they\u2019re on our website?\u201d, is a very common question that we often hear. Thankfully, web server access logs can help us answer this question and others due to the fact that these logs contain a range of information like HTTP requests,Read More &rarr;","og_url":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/","og_site_name":"RedLine13","article_published_time":"2016-04-11T20:59:23+00:00","og_image":[{"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/AccessLogSamper.png"}],"author":"RedLine13","twitter_card":"summary_large_image","twitter_misc":{"Written by":"RedLine13","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/#article","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/"},"author":{"name":"RedLine13","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28"},"headline":"Log File Cloud Testing With JMeter AccessLogSampler","datePublished":"2016-04-11T20:59:23+00:00","dateModified":"2016-04-11T20:59:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/"},"wordCount":541,"publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"keywords":["apache httpd","apache jmeter","Log File Load Testing","NGINX"],"articleSection":["Blog","JMeter","LogFile Replay"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/","url":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/","name":"Log File Cloud Testing With JMeter AccessLogSampler - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2016-04-11T20:59:23+00:00","dateModified":"2016-04-11T20:59:23+00:00","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/log-file-cloud-testing-with-jmeter-accesslogsampler\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Log File Cloud Testing With JMeter AccessLogSampler"}]},{"@type":"WebSite","@id":"https:\/\/www.redline13.com\/blog\/#website","url":"https:\/\/www.redline13.com\/blog\/","name":"RedLine13","description":"(Almost) Free Load Testing in the Cloud","publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.redline13.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.redline13.com\/blog\/#organization","name":"RedLine13","url":"https:\/\/www.redline13.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","contentUrl":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","width":300,"height":68,"caption":"RedLine13"},"image":{"@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28","name":"RedLine13","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g","caption":"RedLine13"},"sameAs":["http:\/\/127.0.0.1"],"url":"https:\/\/www.redline13.com\/blog\/author\/user\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/1736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=1736"}],"version-history":[{"count":0,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/1736\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=1736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/categories?post=1736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/tags?post=1736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}