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

Filebeat: Mixed up fileset.module #4761

Closed
sophiec20 opened this issue Jul 26, 2017 · 4 comments
Closed

Filebeat: Mixed up fileset.module #4761

sophiec20 opened this issue Jul 26, 2017 · 4 comments

Comments

@sophiec20
Copy link
Contributor

sophiec20 commented Jul 26, 2017

  • Version:
    Filebeat 5.6.0-SNAPSHOT from Jul 24 13:17

  • Operating System:
    Linux ip-10-0-1-124 4.4.35-33.55.amzn1.x86_64 #1 SMP Tue Dec 6 20:30:04 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    2 node cluster.

  • Steps to Reproduce:
    I'd tell you if I knew ;)

Whilst trying several different commands using filebeat modules, I noticed that apache2 data had been uploaded with an nginx label.

image

Commands used were probably a combination of:
./filebeat -v -e -modules=apache2,nginx
./filebeat -v -e -modules=apache2
./filebeat -v -e -modules=nginx

Ingest pipelines were reviewed and appeared to be ok.

Will wipe down kit, and attempt to replicate.

@tsg
Copy link
Contributor

tsg commented Jul 27, 2017

Proof reading the code didn't so far reveal conditions where this could happen. I started 1k runs like this:

for ((i=0;i<1000;i++)); do
  echo $i;
  rm data/registry;
  ./filebeat -modules=nginx,apache2 -M "nginx.access.var.paths=[/test/*.log]" -M "apache2.access.var.paths=[module/apache2/access/test/ubuntu-2.2.22.log]" -M "*.*.prospector.close_eof=true" -d "publish" -once -e 2>&1  | grep '"module": "nginx';
done

I'm monitoring the FB output and the ES index. Lets see if it happens on my mac. If not, I'm going to try on Linux as well.

@sophiec20
Copy link
Contributor Author

Consistent reproduction with this

./filebeat -e -modules=apache2,nginx -v

Only changes to apache2 and nginx manifest.yml were the data paths.

Only change to filebeat.yml was data path set to non-existent location, and username and password enabled.

Happy to screen share.

@tsg
Copy link
Contributor

tsg commented Jul 27, 2017

Aha! I could also reproduce it now. Thanks!

tsg pushed a commit to tsg/beats that referenced this issue Jul 27, 2017
Fixes elastic#4761. Due to combining pointer and reference passing we ended up with
passing the same module pointer to multiple filesets. The pointer was correct
during initialization, but wrong during run time.

Also added an Info with the enabled modules / filesets.
@tsg
Copy link
Contributor

tsg commented Jul 27, 2017

Got a fix in #4772. This was kind of embarrassing 😊

urso pushed a commit that referenced this issue Jul 28, 2017
* Fix mixed up modules configuration

Fixes #4761. Due to combining pointer and reference passing we ended up with
passing the same module pointer to multiple filesets. The pointer was correct
during initialization, but wrong during run time.

Also added an Info with the enabled modules / filesets.
tsg added a commit to tsg/beats that referenced this issue Jul 28, 2017
* Fix mixed up modules configuration

Fixes elastic#4761. Due to combining pointer and reference passing we ended up with
passing the same module pointer to multiple filesets. The pointer was correct
during initialization, but wrong during run time.

Also added an Info with the enabled modules / filesets.
(cherry picked from commit 4ce5360)
tsg added a commit to tsg/beats that referenced this issue Jul 28, 2017
* Fix mixed up modules configuration

Fixes elastic#4761. Due to combining pointer and reference passing we ended up with
passing the same module pointer to multiple filesets. The pointer was correct
during initialization, but wrong during run time.

Also added an Info with the enabled modules / filesets.
(cherry picked from commit 4ce5360)
andrewkroh pushed a commit that referenced this issue Jul 31, 2017
* Fix mixed up modules configuration

Fixes #4761. Due to combining pointer and reference passing we ended up with
passing the same module pointer to multiple filesets. The pointer was correct
during initialization, but wrong during run time.

Also added an Info with the enabled modules / filesets.
(cherry picked from commit 4ce5360)
exekias pushed a commit that referenced this issue Aug 2, 2017
* Fix mixed up modules configuration

Fixes #4761. Due to combining pointer and reference passing we ended up with
passing the same module pointer to multiple filesets. The pointer was correct
during initialization, but wrong during run time.

Also added an Info with the enabled modules / filesets.
(cherry picked from commit 4ce5360)
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
* Fix mixed up modules configuration

Fixes elastic#4761. Due to combining pointer and reference passing we ended up with
passing the same module pointer to multiple filesets. The pointer was correct
during initialization, but wrong during run time.

Also added an Info with the enabled modules / filesets.
(cherry picked from commit 644ced8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants