I'm having problems when using exec output.
What i'm trying is exec a command. This command is aws cli (which is installed).
However i get no errors when logstash executes the command.
I think it deals with the user "logstash" who is running logstash. I don't know how may i execute that command with another user.
If i try sudo -S ... aws ... it won't work as i don't know the password of the user logstash (created auto when installs ELK).
The exec output doesn't allow you to select which user to run the command as. A major reason for this is that Logstash typically runs as the logstash user which can't change its effective uid. You have a number of options:
Change file permissions or whatever so that the logstash user can run the aws command.
Write a service that runs as a user with access to run the aws command and have Logstash fire requests to that service via some output.
Create a setuid binary that invokes aws as another user.
Allow the logstash user to run the aws command via password-less sudo.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.