How to pass multiple arguments to shell script in execbeat?


#1

Hi,

I use execbeat to execute my shellscript, which accept multiple arguments. I have my execbeat configuration like;

execbeat:
  execs:
    -
      cron: "@every 5s"
      command: "/shellscripts/test.sh"
      args: "arga argb argc"
      document_type: execbeat
      fields:
        host: 192.168.0.1
        beatname: "beat1"
output.console:
  enabled: true
  pretty: true

my scellscript is very simple, its like;

#!/bin/sh
echo $1

but my ecexbeat always outputs;

arga argb argc

I am expecting only one output arga, how can I do this?

Thank you.


(Mark Walkom) #2

I'll close this in favour of Passing shell script arguments to exectbeat not working


(Mark Walkom) #3