# Preventing to send logs from /var/log/messages and /var/log/secure

**URL:** <https://discuss.elastic.co/t/preventing-to-send-logs-from-var-log-messages-and-var-log-secure/167473>\
**Category:** Elasticsearch\
**Created:** [February 7, 2019, 3:05pm UTC](https://discuss.elastic.co/t/preventing-to-send-logs-from-var-log-messages-and-var-log-secure/167473 "2019-02-07T15:05:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anonymous2](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Anonymous2](https://discuss.elastic.co/u/Anonymous2)\
**Post date:** [February 7, 2019, 3:05pm UTC](https://discuss.elastic.co/t/preventing-to-send-logs-from-var-log-messages-and-var-log-secure/167473/1 "2019-02-07T15:05:26Z")

</div>

Hello,

I have installed and configured Elasticsearch, Logstash, Filebeat and Kibana. I'm sending logs from  
Filebeat to Logstash and to Elasticsearch. I have deleted the /var/log/messages path in filebeat.yml file, but I still recive log messages from /var/log/messages and /var/log/secure. Is it possible to prevent this?

I've tried to prevent them by drop filter in logstash, but it didn't work.

My drop filter in logstash conf file:

> if [source] == "/var/log/messages" {  
> drop { }  
> }

---

<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:** [March 7, 2019, 3:05pm UTC](https://discuss.elastic.co/t/preventing-to-send-logs-from-var-log-messages-and-var-log-secure/167473/2 "2019-03-07T15:05:31Z")

</div>

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