# Logstash - Use case to use syslog

**URL:** <https://discuss.elastic.co/t/logstash-use-case-to-use-syslog/186059>\
**Category:** Logstash\
**Created:** [June 17, 2019, 12:08pm UTC](https://discuss.elastic.co/t/logstash-use-case-to-use-syslog/186059 "2019-06-17T12:08:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![franco.federico](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@franco.federico](https://discuss.elastic.co/u/franco.federico)\
**Post date:** [June 17, 2019, 12:08pm UTC](https://discuss.elastic.co/t/logstash-use-case-to-use-syslog/186059/1 "2019-06-17T12:08:45Z")

</div>

Hi all

I have a simple logastash.conf at the moment. I receive from winlogbeat and I store information in the Elasticsearch.

Now I'd like to add a new output to syslog. I'd like to send only the log of the administrator users to syslog.

How could implement this? I think the following 2 solutions

1. Winlogbeat send information with the field that show the administrators users (at the moment I don't found a solution for this; I see the processor but it isn't possible to use a script to do discover of administrator of the system)
2. Logstash receives information from winlogbeat and for any user check if the user is administrator of the system with a script code(I see that in logstash there is the ruby code that I could use)

Do you have other suggestion?

Thank you  
Franco

---

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 17, 2019, 12:14pm UTC](https://discuss.elastic.co/t/logstash-use-case-to-use-syslog/186059/2 "2019-06-17T12:14:45Z")

</div>

Simply try LOGSTASH OUTPUT PLUGIN  
[https://www.elastic.co/guide/en/logstash/current/plugins-outputs-syslog.html](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-syslog.html)

You can define many parameters there.

**! It is necessary install this plugin to logstash !**

```
/usr/share/logstash/bin/logstash-plugin install logstash-output-syslog
```

---

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 17, 2019, 12:17pm UTC](https://discuss.elastic.co/t/logstash-use-case-to-use-syslog/186059/3 "2019-06-17T12:17:13Z")

</div>

Very useful staff in logstash is **@metadata** field. You can add field based on some condition.. this @metadata field will not be stored to a document. But you can use this field in conditions in **output section** in logstash.

---

<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 15, 2019, 12:17pm UTC](https://discuss.elastic.co/t/logstash-use-case-to-use-syslog/186059/4 "2019-07-15T12:17:18Z")

</div>

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