# Custom Filestream Integration - Adding mappings

**URL:** <https://discuss.elastic.co/t/custom-filestream-integration-adding-mappings/381316>\
**Category:** Elastic Agent\
**Tags:** integrations\
**Created:** [August 25, 2025, 5:07pm UTC](https://discuss.elastic.co/t/custom-filestream-integration-adding-mappings/381316 "2025-08-25T17:07:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 26, 2025, 3:17am UTC](https://discuss.elastic.co/t/custom-filestream-integration-adding-mappings/381316/5 "2025-08-26T03:17:07Z")

</div>

Hi @erikg

Here is how it works.... and agree it is inconsistent between the different packages... the azure input sets up template scaffolding the filestream does not I am no sure why.

That said currently Custom File Stream Input does not generate a template specific to the `data_stream.dataset` that you define and thus just uses the default `logs-*`

You can fix / address this in about 5 minutes .... but if you want to do it really quick here it is I keep this around handy.

Assumes your datastream is `logs-mycustom.filestream-*`

- Put this in
- Rollover the data stream
- It will show up in the UI
- It will use all the logs-\* goodness and add your own.
- Its basically a clone then edit of the `logs` template

```auto
PUT _index_template/logs-mycustom.filestream
{
  "version": 1,
  "priority": 200, << MUST BE GREATER THAN 100 so it takes precendence 
  "template": {
    "mappings": {
      "_source": {
        "mode": "synthetic" 
      }
    },
    "settings": {
      "index": {
        "mode": "standard" <<< I set to logsdb if you want 
      }
    }
  },
  "index_patterns": [
    "logs-mycustom.filestream-*" <<< Your datastream name 
  ],
  "data_stream": {
    "hidden": false,
    "allow_custom_routing": false
  },
  "composed_of": [
    "logs@mappings",
    "logs@settings",
    "ecs@mappings",
    "logs-mycustom.filestream@custom", << ADD THIS
    "logs@custom"
  ],
  "ignore_missing_component_templates": [
    "logs-mycustom.filestream@custom", << ADD THIS
    "logs@custom"
  ],
  "allow_auto_create": true,
  "_meta": {
    "description": "custom filestream logs template",
    "managed": false <<< TURN OF MANAGED 
  },
  "deprecated": false
}

```

You can then add your custom mappings and settings to  
`logs-mycustom.filestream@custom` or  
`liga@custom`

---

_[View the full topic](https://discuss.elastic.co/t/custom-filestream-integration-adding-mappings/381316)._
