|
| 1 | +[[configure-dns-histogram]] |
| 2 | + |
| 3 | += Configure the DNS histogram |
| 4 | + |
| 5 | +The DNS histogram (**Top domains by dns.question.registered_domain**) on the **Network** page helps you visualize domain activity in your environment. If you're using {elastic-defend}, you may need to add the `dns.question.registered_domain` field so that DNS data appears correctly. |
| 6 | + |
| 7 | +If the DNS histogram is empty, follow these steps to populate the data. |
| 8 | + |
| 9 | +[discrete] |
| 10 | +== Add the `dns.question.name` field |
| 11 | + |
| 12 | +Add the `dns.question.name` field to the Events table to confirm that DNS data is available. |
| 13 | + |
| 14 | +. Go to the **Network** page using the navigation menu or the {kibana-ref}/introduction.html#kibana-navigation-search[global search field]. |
| 15 | +. Select the **Events** tab. |
| 16 | +. In the Events table, click **Fields**, then add the `dns.question.name` field. |
| 17 | + |
| 18 | +[discrete] |
| 19 | +== Create a custom ingest pipeline |
| 20 | + |
| 21 | +Create an ingest pipeline that extracts registered domains (for example, `example.com`) from full DNS query names (for example, `www.example.com`). |
| 22 | + |
| 23 | +. Go to the **Ingest Pipelines** page using the navigation menu or the {kibana-ref}/introduction.html#kibana-navigation-search[global search field], and select **Create pipeline → New pipeline**. |
| 24 | +. On the **Create pipeline** page, set the pipeline name to `logs-endpoint.events.network@custom`. |
| 25 | +. Click **Add a processor**. In the **Add processor** flyout, configure the following: |
| 26 | +.. From the **Processor** dropdown, select **Registered domain**. |
| 27 | +.. Under **Field**, enter `dns.question.name`. |
| 28 | +.. Under **Target field (optional)**, enter `dns.question.registered_domain`. |
| 29 | +.. Turn **Ignore missing** on. |
| 30 | +.. Under **Condition (optional)**, enter `ctx?.dns?.question?.name != null`. |
| 31 | +.. Turn **Ignore failures for this processor** on. |
| 32 | +.. Select **Add processor**. |
| 33 | +. Select **Create pipeline**. This custom pipeline is automatically picked up by the existing `logs-endpoint.events.network-<version>` pipeline. |
| 34 | + |
| 35 | +[discrete] |
| 36 | +== Add the `dns.question.registered_domain` field |
| 37 | + |
| 38 | +Add the `dns.question.registered_domain` field to the Events table to verify that the ingest pipeline processes DNS queries correctly. |
| 39 | + |
| 40 | +. Go back to the Events table on the **Network** page. |
| 41 | +. Click **Fields**, then add the `dns.question.registered_domain` field. |
| 42 | + |
| 43 | +After you configure the DNS histogram, it will show domain activity grouped by registered domain, allowing you to identify the top domains queried in your environment. |
0 commit comments