# How to find the time taken to upload/write a file from filebeat to logstash to elastic search(pipeline)?

**URL:** https://discuss.elastic.co/t/how-to-find-the-time-taken-to-upload-write-a-file-from-filebeat-to-logstash-to-elastic-search-pipeline/323716
**Category:** Elasticsearch
**Tags:** elastic-stack-monitoring
**Created:** [January 23, 2023, 10:22am UTC](https://discuss.elastic.co/t/how-to-find-the-time-taken-to-upload-write-a-file-from-filebeat-to-logstash-to-elastic-search-pipeline/323716 "2023-01-23T10:22:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![greg\_deg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/greg_deg/32/116272_2.png) [@greg\_deg](https://discuss.elastic.co/u/greg_deg)
#### Post date: [January 23, 2023, 10:22am UTC](https://discuss.elastic.co/t/how-to-find-the-time-taken-to-upload-write-a-file-from-filebeat-to-logstash-to-elastic-search-pipeline/323716/1 "2023-01-23T10:22:23Z")

</div>

So I have a log file that is taken as an input by filebeat which is then outputted to logstash and from there to Elasticsearch. I need to calculate the time required/elapsed from the time I start filbeat and its reading process till the time it reaches Elasticsearch.

The pipeline is logfile--\>filebeat--\>logstash--\>els. I need to find time elapsed from filbeat to els. I'm new to ELK and don't know how to use grok or similar features yet.

I have configured filebeat.yml as follows:

filebeat.inputs:

- type: log paths:
- /home/user/us/logs/lgfile.json output.logstash: hosts: ["localhost:port"]

and logstash conf file as:

```auto
input {

    beats {

        port => "5044"

    }

}

output {

    stdout { codec => rubydebug }
    
    elasticsearch {
    hosts => ["localhost:port"]
    index => "elkpipego"
  }

}

```

So far I have manually done this time calculation using a stopwatch from the time logstash reads the first msg and then used the difference with the timestamp of the last message. But this is clearly not so accurate and I would like to know if there's a way using any feature/grok/tool like jmeter/esrally or anything where I could accurately find the exact time elapsed till the last message is stashed on Elasticsearch? TIA

---

<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: [February 20, 2023, 10:23am UTC](https://discuss.elastic.co/t/how-to-find-the-time-taken-to-upload-write-a-file-from-filebeat-to-logstash-to-elastic-search-pipeline/323716/2 "2023-02-20T10:23:04Z")

</div>

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