# Multiple Output by @timestamp filter in Logstash

**URL:** <https://discuss.elastic.co/t/multiple-output-by-timestamp-filter-in-logstash/227842>\
**Category:** Logstash\
**Created:** [April 14, 2020, 3:00am UTC](https://discuss.elastic.co/t/multiple-output-by-timestamp-filter-in-logstash/227842 "2020-04-14T03:00:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie001](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@newbie001](https://discuss.elastic.co/u/newbie001)\
**Post date:** [April 14, 2020, 3:00am UTC](https://discuss.elastic.co/t/multiple-output-by-timestamp-filter-in-logstash/227842/1 "2020-04-14T03:00:09Z")

</div>

Hello - Is there a way I can output the _message_ in different files by _@timestamp_ in logstash? These are all outputted in JSON Files.

I am very new to logstash and I am not quite sure on how to output it in multiple files by its different timestamp.

**Actual output is this:**

```auto
    {
      "@version": "1",
      "@timestamp": "2020-03-14T02:36:25.441Z",
      "message": "#Money Exchange Rate\r\n250\r\n#Date of Export\r\nWed Jan 20 09:40:12 2018\r\n#Current Exchange\r\nSGDUSD\r\n#MoneyCounter\r\n207 \r",
      "tags": [
        "multiline"
      ],
      "host": "BD001A2A"
    }{
      "@version": "1",
      "@timestamp": "2020-03-14T02:36:25.497Z",
      "message": "#----- Start Task -----\r\n\r\n#Location\r\nOrchard Road\\Singapore\\01ACVB\\125\r\n#Counter ID\r\n7008\r",
      "tags": [
        "multiline"
      ],
      "host": "BD001A2A"
    }{
      "@version": "1",
      "@timestamp": "2020-03-14T02:37:02.809Z",
      "message": "#----- Start Task -----\r\n\r\n#Location\r\nDotonburi\\Japan\\98CVBS\\112\r\n#Counter ID\r\n9001\r",
      "tags": [
        "multiline"
      ],
      "host": "BD001A2A"
    }

```

**Expected output: (should have 3 outputs)**

_Output 1:_

```auto
    {
          "@version": "1",
          "@timestamp": "2020-03-14T02:36:25.441Z",
          "message": "#Money Exchange Rate\r\n250\r\n#Date of Export\r\nWed Jan 20 09:40:12 2018\r\n#Current Exchange\r\nSGDUSD\r\n#MoneyCounter\r\n207 \r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A"
        }

```

_Output 2:_

```auto
    {
          "@version": "1",
          "@timestamp": "2020-03-14T02:36:25.497Z",
          "message": "#----- Start Task -----\r\n\r\n#Location\r\nOrchard Road\\Singapore\\01ACVB\\125\r\n#Counter ID\r\n7008\r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A"
        }

```

_Output 3:_

```auto
    {
          "@version": "1",
          "@timestamp": "2020-03-14T02:37:02.809Z",
          "message": "#----- Start Task -----\r\n\r\n#Location\r\nDotonburi\\Japan\\98CVBS\\112\r\n#Counter ID\r\n9001\r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A"
        }

```

---

<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:** [May 12, 2020, 3:12am UTC](https://discuss.elastic.co/t/multiple-output-by-timestamp-filter-in-logstash/227842/2 "2020-05-12T03:12:39Z")

</div>

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