# Creating Correlated logs & metrics dashboards

{% hint style="warning" %}
**To create correlation dashboards it is quintessential to create a visualization where you can apply the filters to the dashboards to establish the correlation between the filter and other visualizations on your dashboard.**
{% endhint %}

{% hint style="warning" %}
**To make a visualization where we can see the data and apply the filter to the live dashboard, you must create a search object and then add it to the visualization to apply the filter.**
{% endhint %}

\
Below given are the steps that are required to create such a search object and then using it as a filter for all the visualization on the dashboard:

1\. Click on the menu bar on the lef&#x74;**-**&#x68;and corner of the second ribbon on the screen and then click on  the _**“Discover”**_ tab

2\.  Once you click on the discover tab _**“Enter the index”**_ of the logs/metrics that you want to build your search on. (For this example, you may use the logs from Mysql. Below given is the screenshot of the logs). Select the required index.



![Select required Index for creating Search Object](https://1004160589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUh1bMx9Zb5YpSL8Jqw%2Fuploads%2FSkogSG82t7RAmrQGrOzC%2FIndexSelection.png?alt=media\&token=4d343382-7aff-47a9-b000-8e4b9a118b6d)

3\. Once you select the required index. You will then reach a screen as shown below:

![Sample Data | Discover Tab](https://1004160589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUh1bMx9Zb5YpSL8Jqw%2Fuploads%2FdyyzySSDdXmv1EDPor9Z%2FDiscoverTab.png?alt=media\&token=bcd69b4d-d9e8-49f8-b2d6-ecf88b050c8d)

4\. Select the _**“Column”**_ as per the requirements that you want to display on the visualization on your dashboard. Use the _**“Plus”**_ sign on each of the fields as shown below:



![Selected fields will appear as colums in Search Object](https://1004160589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUh1bMx9Zb5YpSL8Jqw%2Fuploads%2Fxyn0Yg6vHgkYTLpCwEhP%2FColumnSelection.png?alt=media\&token=97ccff1c-bed4-4b44-9f8a-9f9811ed1d9a)

**5.** Once you have selected all the required fields click on the _**“Save”**_ button on the top end corner

6\. Give a “Unique name” for the visualization which would appear on your dashboard.

7\. Move to the required dashboard and click the _**“Edit”**_ button to add the new search panel to your dashboard and then click on the _**“Add”**_ option from the list of options

8\. Once you click “**Add”**, a pop-up will appear on the right side of the screen to add the search panel. Search for the required panel name and then select the type of panel as _**“Saved Search”**_ as shown below:

![Use this option to optimally search for Search Objects](https://1004160589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUh1bMx9Zb5YpSL8Jqw%2Fuploads%2Ff6EUqDPLNtOZ0nKUNzBk%2FSavedSearch.png?alt=media\&token=63c41cf5-eb8b-403a-a64c-750be797317b)

&#x39;**.** Click on the _**“Respective Panel Name”**_ to add the search panel as a visualization on the dashboard.

{% hint style="info" %}
**Now that you have created a new search object on the dashboard. You can now use the search filter from the search panel**
{% endhint %}

10\. Reach out to the search panel that you have added to the dashboard from the previous steps. ( Example: of MySQL - Log Search data; show below)

![Sample Search Object](https://1004160589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUh1bMx9Zb5YpSL8Jqw%2Fuploads%2FvlOyD1Ix9PPULAakiZg0%2FSearchObject.png?alt=media\&token=623c341d-b1ed-40ac-9f33-cf5eb3cdb01b)

**11.** For filtering out the data based on the values under the respective column names hover your pointer over the required field name and click on the _**“(+)Plus button”**_&#x20;

![Filtering is allowed on each field along all columns](https://1004160589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUh1bMx9Zb5YpSL8Jqw%2Fuploads%2F95QiFExYH5LCH4HpAVF0%2FFilteringValues.png?alt=media\&token=1907df00-c9c3-466a-8de7-da5501076738)

**12.** Once you have selected the required filter all the graphs and metrics on your dashboard will be displayed with the applied filter(Example: Snapshot given below is based on the host.name). To confirm if the settings are applied across all the visualizations check on the top end corner of the dashboard as shown below

![Included field using filter highlighted in Yellow](https://1004160589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUh1bMx9Zb5YpSL8Jqw%2Fuploads%2FEhBn36XAIbvGs2NZv9Mo%2FSearchObjectFilter.png?alt=media\&token=8f022e88-ef8c-4cdd-8ebb-e76fa72c47a2)

13\. To eliminate any fields from the search, reach out to the search panel again & click on “(-)minus” sign. (Example: host.name: mysql-8)

14\. To confirm if  the filter is applied to all the visualizations check on the top left-hand corner of the elastic dashboard(Example: Continuation from point 4)

![Filtered out value won't appear anywhere on the dashbaord](https://1004160589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUh1bMx9Zb5YpSL8Jqw%2Fuploads%2FGbGFFe0Aa3gXcyqTvmFE%2FFilterOutValue.png?alt=media\&token=4bc88e72-93d0-46f9-9b21-648c917a5d0e)

15\. You can also use multiple filters together to change the values across your metrics.

{% hint style="success" %}
**Now you have successfully combined two different indices to filter the values and establish a correlation for the visualization on the dashboard.**
{% endhint %}
