# Detect invalid configuration

**URL:** <https://forum.suricata.io/t/detect-invalid-configuration/3229>\
**Category:** Help\
**Tags:** configuration, suricata\
**Created:** [February 15, 2023, 4:35pm UTC](https://forum.suricata.io/t/detect-invalid-configuration/3229 "2023-02-15T16:35:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrien\_moreau](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/adrien_moreau/32/1844_2.png) [@adrien\_moreau](https://forum.suricata.io/u/adrien_moreau)\
**Post date:** [February 15, 2023, 4:35pm UTC](https://forum.suricata.io/t/detect-invalid-configuration/3229/1 "2023-02-15T16:35:40Z")

</div>

I am struggling to find a way to test the validity of some suricata config file.  
Let’s say I have the following condiguration suricata.yaml file:

```auto
outputs:
  - eve-log:
      enabled: yuhu
      abcd: toto
      filetype: titi
      filename: eve.json

```

IMO this file should be considered invalid for several reasons (enabled should expect boolean value, abcd is unknown field, titi is not in the list of possible values for filetype)

If I run:

`suricata -T suricata.yaml`  
or  
`suricata -c suricata.yaml --dump-config`

Neither of this command return non zero status code or write anything that could potentially indicate that the configuration is invalid. Is it the expected behavior? Am I missing something?

---

<div class="post-metadata">

**Author:** ![jufajardini](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jufajardini/32/896_2.png) [@jufajardini](https://forum.suricata.io/u/jufajardini)\
**Post date:** [February 15, 2023, 6:55pm UTC](https://forum.suricata.io/t/detect-invalid-configuration/3229/2 "2023-02-15T18:55:26Z")

</div>

I think you have a valid point.  
We have bug tickets for related issues (see [Bug #4553: Configuration test mode succeeds when reference.config file contains invalid content - Suricata - Open Information Security Foundation](https://redmine.openinfosecfoundation.org/issues/4553)) but I couldn’t find one for the `suricata.yaml` file…
