# cfxdm - dm:hist

**dm:hist:** This cfxdm tag allows the user to generate an histogram out of timeseries data from a selected extension's tag.

**dm:hist** synta&#x78;**:**

* **timestamp (mandatory):** select timestamp column from the selected extension's tag.
* **interval (mandatory):** select the interval in days or hours or minutes or seconds. (Ex: 1d (day), 4h (hour), 15min (minutes), 30s (seconds)&#x20;

In the below example, for a reference, we are going to use **Elasticsearch** as an extension to query the timeseries data index (or indexes) and ingest it into **dm:hist** to generate an histogram.

Enter the below command to select **Elasticsearch's index tag (#es124111:winlog-events**). (In this example, **es124111** name is used as a label to identify Elasticsearch extension, and **winlog-events** representing Windows log events indexes with Elasticsearch extension as a tag. The label is defined while adding the extension in cfxdx configuration file or through UI or CLI)

```
tag #es124111:winlog-events
```

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MVjI8mVXYKEYC0CJ1TJ%2F-MVxKLt997lMZ45Va0qk%2FScreen%20Shot%202021-03-16%20at%204.18.10%20PM.png?alt=media\&token=9ae3ffb6-ff7e-4821-8f9b-3447a0190265)

**Example 1:** Select log events as timeseries data and generate an histogram

Get timeseries data out of Windows log events from Elasticsearch tag for last 10 hours with an interval of 1 hour and generate an histogram.

**Timestamp Column:**

* **@timestamp**

```
data `@timestamp` after -10 hour --> dm:hist timestamp = '@timestamp' & interval = '1h'
```

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MVxKOaedG2vkEFaZJI_%2F-MVxNAwU4oQvLxMNIo_F%2FScreen%20Shot%202021-03-16%20at%204.30.35%20PM.png?alt=media\&token=6c7d1629-ed27-4b0b-a3b0-b74127043cce)
