# Filebeat CEL Input Type - FIle Options

**URL:** https://discuss.elastic.co/t/filebeat-cel-input-type-file-options/350812
**Category:** Elasticsearch
**Created:** [January 11, 2024, 3:27am UTC](https://discuss.elastic.co/t/filebeat-cel-input-type-file-options/350812 "2024-01-11T03:27:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bigdaddy0918](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bigdaddy0918](https://discuss.elastic.co/u/bigdaddy0918)
#### Post date: [January 11, 2024, 3:27am UTC](https://discuss.elastic.co/t/filebeat-cel-input-type-file-options/350812/1 "2024-01-11T03:27:23Z")

</div>

I'm using a CEL type input in Filebeat. Currently the filebeat.yml file points at a specific directory/file.

What is the syntax to wildcard a portion of the file? (i.e. for the parameter  
resource.url: file:///home/directory/subdirectory1/subdirectory2/file.name

how can I specify  
resource.url: file:///home/directory/\*/subdirectory2/file.name

in the filebeat.yml file?

Marty Pacocha

---

<div class="post-metadata">

### Author: ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)
#### Post date: [January 13, 2024, 9:35am UTC](https://discuss.elastic.co/t/filebeat-cel-input-type-file-options/350812/2 "2024-01-13T09:35:08Z")

</div>

> [@bigdaddy0918](#):
>
> I'm using a CEL type input in Filebeat. Currently the filebeat.yml file points at a specific directory/file.
> 
> What is the syntax to wildcard a portion of the file? (i.e. for the parameter  
> resource.url: file:///home/directory/subdirectory1/subdirectory2/file.name
> 
> how can I specify  
> resource.url: file:///home/directory/\*/subdirectory2/file.name
> 
> in the filebeat.yml file?
> 
> Marty Pacocha

Hi,

you can use wildcards in the paths to specify multiple files. However, the wildcard (\*) can only be used to match files in a directory, not directories themselves.

if you want to match files in multiple directories, you will need to specify each directory separately. For example:

```auto
filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /home/directory/subdirectory1/subdirectory/*.log
    - /home/directory/subdirectory3/subdirectory/*.log

```

Regards

---

<div class="post-metadata">

### Author: ![bigdaddy0918](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bigdaddy0918](https://discuss.elastic.co/u/bigdaddy0918)
#### Post date: [January 15, 2024, 7:40pm UTC](https://discuss.elastic.co/t/filebeat-cel-input-type-file-options/350812/3 "2024-01-15T19:40:12Z")

</div>

We are successfully using wildcards in directories in other Filebeat inputs. The difference between those instances and this one is that for the successful instance we use the keyword _paths_, but for CEL we need to use the keyword _resource_.

I'm trying to figure out is whether we can use wildcards for the _resource_ keyword or not.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 12, 2024, 7:40pm UTC](https://discuss.elastic.co/t/filebeat-cel-input-type-file-options/350812/4 "2024-02-12T19:40:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
