gohovd
August 21, 2020, 8:40am
1
I am working on an automated deployment of filebeat, and one of the steps is to enroll the beat.
As per the documentation , to have this process scripted, I need to use 'Username and password-based enrollment', where the chosen method is env:VAR.
I am on CentOS 7, and these are the steps I take:
export beats_pass=some_password
sudo filebeat enroll KIBANA_URL --username USER --password env:beats_pass
The result is:
"environment variable beats_pass does not exist"
Doing export -p confirms the environment variable is registered.
What am I doing wrong?
gohovd
August 24, 2020, 10:06am
2
SOLVED
With a workaround. Just set the "environment variable" as you do the sudo enroll, like so:
sudo BEATS_PASS=some_password filebeat enroll KIBANA_URL --username USER --password env:BEATS_PASS --force
PS: If you get 'empty_access token' when using the --force flag, remove contents of /var/lib/filebeat/.
Thank you for posting the solution!
system
(system)
Closed
September 22, 2020, 12:43pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.