Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading the template by default doesn't work on Windows when running as a serivce #1315

Closed
tsg opened this issue Apr 5, 2016 · 7 comments
Closed
Assignees
Labels

Comments

@tsg
Copy link
Contributor

tsg commented Apr 5, 2016

The problem is that the Beats look for the template by default in the working directory. When running as a service, the current working directory is set to %WinDir%\System32 or something like that.

Possible solution 1: modify logic to look for the template relative to the path where the binary is.
Possible solution 2: copy the template in C:\programdata\*beat\ and use an absolute path for it.

Workaround: manually load the template

@urso
Copy link

urso commented Apr 5, 2016

I'd prefer solution 2, but when/who/how to copy the file to programdata?

@tsg
Copy link
Contributor Author

tsg commented Apr 5, 2016

Solution 2 is tricky because we don't have a real installer, but an "install" script. The install script could copy it there, but it would also need to modify the configuration file, which is weird.

@andrewkroh
Copy link
Member

From with ruflin back on March 24, he was under the impression that it was doing solution 1.

@tsg
Copy link
Contributor Author

tsg commented Apr 5, 2016

@andrewkroh I also somehow remember that, but the code doesn't seem to have any special logic for it: https://github.com/elastic/beats/blob/master/libbeat/outputs/elasticsearch/output.go#L146

@ruflin
Copy link
Member

ruflin commented Apr 5, 2016

It was the intention that it is doing solution one. To start we should use the same logic as for the config file. In the long run I hope instead of solution 2 to have a general config and data directory we can use.

@tsg tsg self-assigned this Apr 6, 2016
@tsg
Copy link
Contributor Author

tsg commented Apr 6, 2016

+1 on handling this together with the concept of the data path. Since the data path will be a breaking change, it would be nice to introduce it in alpha2. I'll put together a proposal.

@tsg tsg mentioned this issue Apr 11, 2016
14 tasks
@tsg
Copy link
Contributor Author

tsg commented Jun 6, 2016

This was fixed via #1371.

@tsg tsg closed this as completed Jun 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants