# Filebeat mssql module multiple drive paths in var.paths config

**URL:** <https://discuss.elastic.co/t/filebeat-mssql-module-multiple-drive-paths-in-var-paths-config/340554>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 10, 2023, 11:42am UTC](https://discuss.elastic.co/t/filebeat-mssql-module-multiple-drive-paths-in-var-paths-config/340554 "2023-08-10T11:42:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_Sharp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/craig_sharp/32/80024_2.png) [@Craig\_Sharp](https://discuss.elastic.co/u/Craig_Sharp)\
**Post date:** [August 10, 2023, 11:42am UTC](https://discuss.elastic.co/t/filebeat-mssql-module-multiple-drive-paths-in-var-paths-config/340554/1 "2023-08-10T11:42:07Z")

</div>

I am ingesting mssql logs from a failover cluster. Due to the nature of the cluster each node has a different mount / drive letter for the log data. The cluster may have M:, N:, O: P:, etc. but only one per node. This make it difficult to do a standard deploy of the mssql module as I have to list each drive in the config (see below), to make sure that each drive is covered. If a node were to failover, there may be two drives (M: and N:) on a single node. Listing each possible drive is very messy.

Is there a way to list a range of drives such as below or am I going to have to continue with the multiple drive listing?

```auto
- [M-Q]:\Log\ERRORLOG*
- [M-Q]:\Log\SQLAGENT*

```

Current config below

```auto
# Module: mssql
# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.13/filebeat-module-mssql.html
 
- module: mssql
  # Fileset for native deployment
  log:
    enabled: true
    var.paths:
      - M:\Log\ERRORLOG*
      - M:\Log\SQLAGENT*
      - N:\Log\ERRORLOG*
      - N:\Log\SQLAGENT*
      - O:\Log\ERRORLOG*
      - O:\Log\SQLAGENT*
      - P:\Log\ERRORLOG*
      - P:\Log\SQLAGENT*
      - Q:\Log\ERRORLOG*
      - Q:\Log\SQLAGENT*
    input:
      encoding: utf-16le-bom
      pipeline: logs-mssql

```

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [August 11, 2023, 6:56am UTC](https://discuss.elastic.co/t/filebeat-mssql-module-multiple-drive-paths-in-var-paths-config/340554/2 "2023-08-11T06:56:39Z")

</div>

According to [the documentation](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#input-paths), should be supported.  
I hadn't try, however syntax should be like your suggested or something like this:  
`- [m-qM-Q]:\Log\SQLAGENT*`

> Glob returns the names of all files matching pattern or nil if there is no matching file. The syntax of patterns is the same as in Match.

> Match reports whether name matches the shell file name pattern. The pattern syntax is:
> 
> pattern:  
> { term }  
> term:  
> '_' matches any sequence of non-Separator characters  
> '?' matches any single non-Separator character  
> '[' ['^'] { character-range } ']'  
> character class (must be non-empty)  
> c matches character c (c != '_', '?', '\', '[')  
> '\' c matches character c
> 
> character-range:  
> c matches character c (c != '\', '-', ']')  
> '\' c matches character c  
> lo '-' hi matches character c for lo \<= c \<= hi

---

<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:** [September 8, 2023, 8:57am UTC](https://discuss.elastic.co/t/filebeat-mssql-module-multiple-drive-paths-in-var-paths-config/340554/3 "2023-09-08T08:57:27Z")

</div>

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