# Winlogbeatで複数ファイルを振り分ける方法

**URL:** <https://discuss.elastic.co/t/winlogbeat/298093>\
**Category:** 日本語による質問・議論はこちら\
**Created:** [February 23, 2022, 11:01pm UTC](https://discuss.elastic.co/t/winlogbeat/298093 "2022-02-23T23:01:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gou\_gemma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gou_gemma/32/102109_2.png) [@gou\_gemma](https://discuss.elastic.co/u/gou_gemma)\
**Post date:** [February 23, 2022, 11:01pm UTC](https://discuss.elastic.co/t/winlogbeat/298093/1 "2022-02-23T23:01:51Z")

</div>

複数ディレクトリに格納されたファイルをwinlogbeatからlogstashにファイルを送信した後で、ディレクトリ毎にファイルを格納したいです。

filebeatであれば、tagsで振り分けができたのですがwinlogbeatではfilebeatでいう、tagsのような振り分けに適したパラメータがあるのでしょうか？  
ちなみにfilebeatでは以下のようにディレクトリ毎に振り分けをしています。

```auto
output {
  if "filebeat" in [tags] {
    file {
    path => "/var/tmp/logstash/localhost/filebeat.log"
     }
  }
  else if "secure" in [tags] {
     file {
      path => "/var/tmp/logstash/localhost/secure.log"
   }
}

```

どなたか、ご存じでしたらご教示願います💦

---

<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 23, 2022, 11:02pm UTC](https://discuss.elastic.co/t/winlogbeat/298093/2 "2022-03-23T23:02:23Z")

</div>

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