# How to validate data uploaded on Elastic cluster successfully

**URL:** <https://discuss.elastic.co/t/how-to-validate-data-uploaded-on-elastic-cluster-successfully/203975>\
**Category:** Elasticsearch\
**Created:** [October 17, 2019, 6:11am UTC](https://discuss.elastic.co/t/how-to-validate-data-uploaded-on-elastic-cluster-successfully/203975 "2019-10-17T06:11:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [October 17, 2019, 6:11am UTC](https://discuss.elastic.co/t/how-to-validate-data-uploaded-on-elastic-cluster-successfully/203975/1 "2019-10-17T06:11:37Z")

</div>

Hi ,

I have some raw data and after preprocessing it through python I am uploading it on ELK through logstash in the following way.

cat get\_info.sh

#!/bin/bash  
/home/abc/script/allocated\_budget\_info.py | /usr/share/logstash/bin/logstash -f /home/abc/script/budget.conf --path.settings=/etc/logstash --path.data=/home/abc/junk1

When I run this script (get\_info.sh) and if it fails due to issue with python script (/home/abc/script/allocated\_budget\_info.py) It show me an error on terminal .

Now I want the check if there is any way (plugin) to display an error on terminal if it would not able to upload the data on ELK due to some error . Although I can see the error on logstash log file but that is not helpful for me as I trigger this script at some specific action and want to generate an alert email / msg if data not uploaded on ELK successfully.  
I tried stdout plugin but it showing same msg on both pass/fail condition.

For testing purpose I passed the date in yyyy-m-d format and it didn't upload the data on ELK (as expected as in Elastic date format should be yyyy-mm-dd format). It show an error on logstash log file:

error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"failed to parse [startDate]", "caused\_by"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"Invalid format: "2019-1-31" is malformed at

But of terminal in both success and failure cases it showing the same msg .

2019-10-17T05:41:04.125Z dev02 %{message}  
2019-10-17T05:41:04.133Z dev02 %{message}

---

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [October 21, 2019, 9:50am UTC](https://discuss.elastic.co/t/how-to-validate-data-uploaded-on-elastic-cluster-successfully/203975/2 "2019-10-21T09:50:02Z")

</div>

Got the answer. I can make a elastic query and check the timestamp of the index.

---

<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:** [November 18, 2019, 9:50am UTC](https://discuss.elastic.co/t/how-to-validate-data-uploaded-on-elastic-cluster-successfully/203975/3 "2019-11-18T09:50:03Z")

</div>

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