How can i get from Execbeat if a script successfully executed

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

1 Like

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 of execbeat, I assume you can look at exitCode.

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