# How can i get from Execbeat if a script successfully executed

**URL:** <https://discuss.elastic.co/t/how-can-i-get-from-execbeat-if-a-script-successfully-executed/152504>\
**Category:** Beats\
**Created:** [October 15, 2018, 1:54pm UTC](https://discuss.elastic.co/t/how-can-i-get-from-execbeat-if-a-script-successfully-executed/152504 "2018-10-15T13:54:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bab/32/86201_2.png) [@bab](https://discuss.elastic.co/u/bab)\
**Post date:** [October 15, 2018, 1:54pm UTC](https://discuss.elastic.co/t/how-can-i-get-from-execbeat-if-a-script-successfully-executed/152504/1 "2018-10-15T13:54:51Z")

</div>

Hello all,

I am using execbeat (ttps://github.com/christiangalsterer/execbeat) with ELK 6.3. I would like to know if certain my scripts are successfully executed AND if not i would like to report the issue. actually my script work fine, i need just to be known if the script not correctly executed (respons Yes/No from the execbeat to getting).  
below is my conf:

```
execbeat:

  commands:
    -
     schedule: "@every 10s"
     command: "/home/badr/Downloads/shellscript/test.sh"
     document_type: script_1_type

output.elasticsearch:
  hosts: ["localhost:9200"]

```

My script to run as example:

```
#!/bin/sh
echo $1
echo "test"

echo "This is a shell script"  
ls -lah

```

any help please.  
Thank you in advance

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 16, 2018, 9:13pm UTC](https://discuss.elastic.co/t/how-can-i-get-from-execbeat-if-a-script-successfully-executed/152504/2 "2018-10-16T21:13:19Z")

</div>

Note: I haven't used execbeat

Applications/Scripts that fail normally use an exit code (0 means ok) and write errors to stderr. Checking the [fields.yml](https://github.com/christiangalsterer/execbeat/blob/master/_meta/fields.yml) of execbeat, I assume you can look at `exitCode`.

---

<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 12, 2018, 1:54pm UTC](https://discuss.elastic.co/t/how-can-i-get-from-execbeat-if-a-script-successfully-executed/152504/3 "2018-11-12T13:54:51Z")

</div>

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