In our environment, where multiple hosts are responding to web requests for customers who browse the website, it is good to get an idea of the current number of each method request split by the host. Methods relate to request/response actions between a customer's web client and our web hosts. Having this type of information can enable us to understand if these requests are properly being balanced across the hosts or if one host is receiving the majority of the load.
In this recipe, you will write a Splunk search to chart the number of method requests split by type and host. You will then graphically represent these values on a dashboard, using a column chart.
To step through this recipe, you will need a running Splunk Enterprise server, with the sample data loaded from Chapter 1, Play Time – Getting Data In. You should be familiar with the Splunk search bar, the time range picker, and the Visualization tab. It is not required, but is advisable, that you also complete all the recipes up until this point.
Follow the given steps to chart the number of method requests by type and host:
index=main sourcetype=access_combined | chart count by host,method
Let's break down the search piece by piece:
Search fragment |
Description |
---|---|
|
You should now be familiar with this search from the earlier recipes. |
|
The |
The Visualization tab simply takes the tabulated output of the stats
command and overlays the given visualization. In this case, you overlaid a column chart visualization on the total count for each method split by host.
18.217.109.151