-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Comments
I'd prefer solution 2, but when/who/how to copy the file to programdata? |
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. |
From with ruflin back on March 24, he was under the impression that it was doing solution 1. |
@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 |
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. |
+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. |
This was fixed via #1371. |
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
The text was updated successfully, but these errors were encountered: