# Service logstash configtest gone

**URL:** <https://discuss.elastic.co/t/service-logstash-configtest-gone/64488>\
**Category:** Logstash\
**Created:** [October 31, 2016, 8:19pm UTC](https://discuss.elastic.co/t/service-logstash-configtest-gone/64488 "2016-10-31T20:19:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsaeks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rsaeks/32/5068_2.png) [@rsaeks](https://discuss.elastic.co/u/rsaeks)\
**Post date:** [October 31, 2016, 8:19pm UTC](https://discuss.elastic.co/t/service-logstash-configtest-gone/64488/1 "2016-10-31T20:19:20Z")

</div>

In pre 5.0 instances of logstash, after making changes to a config file it was possible to run:

service logstash configtest

After updating to version 5, this no longer works and returns back:

The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

This is on CentOS 7 running logstash 5.0

Does anyone know the new syntax? I searched through the version 5 documentation for "configtest" and nothing came up.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 31, 2016, 8:33pm UTC](https://discuss.elastic.co/t/service-logstash-configtest-gone/64488/2 "2016-10-31T20:33:53Z")

</div>

```
/path/to/logstash -t -f /etc/logstash/conf.d

```

[https://www.elastic.co/guide/en/logstash/current/command-line-flags.html](https://www.elastic.co/guide/en/logstash/current/command-line-flags.html)

That said I think it's a better idea to validate the configuration files before even copying them into place.

---

<div class="post-metadata">

**Author:** ![rsaeks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rsaeks/32/5068_2.png) [@rsaeks](https://discuss.elastic.co/u/rsaeks)\
**Post date:** [November 1, 2016, 6:38pm UTC](https://discuss.elastic.co/t/service-logstash-configtest-gone/64488/3 "2016-11-01T18:38:22Z")

</div>

> [@magnusbaeck](#):
>
> -t -f /etc/logstash/conf.d

Thanks! I had to modify the command a bit:  
/path/to/logstash -t -f --path.settings=/etc/logstash/

That allows it to find the logstash.yml file to include the conf.d path. The only downside to running this way is there is no confirmation feedback as there was with service logstash configtest. When that returned without error it printed "Configuration OK"

The same in 5.0 with the above command results in output "Sending Logstash logs to /var/log/logstash which is now configured via log4j2.properties." even when there is an intentional error. Interestingly, none of the logfiles in that path reflect the error.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 1, 2016, 6:40pm UTC](https://discuss.elastic.co/t/service-logstash-configtest-gone/64488/4 "2016-11-01T18:40:18Z")

</div>

Hmm. Sounds like a bug to me.

---

<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:** [July 6, 2017, 4:31am UTC](https://discuss.elastic.co/t/service-logstash-configtest-gone/64488/5 "2017-07-06T04:31:41Z")

</div>


