Conversation
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Previously DefaultConfig() was not being called so default environment vaiables weren't used. This also renames the library import from nomadbeat to nomadlib.
159f3fb to
95b72c9
Compare
| return nil, err | ||
| } | ||
|
|
||
| go watcher.Start() |
There was a problem hiding this comment.
Which function calls watcher.Stop? How do you make sure that the goroutine is stopped when it has to?
There was a problem hiding this comment.
It's not called anywhere. I tried to find a way to call this, but the Processor interface only defines the Run and String methods. Anyway, in filebeat, the processor is defined on the configuration and applied until the program is stopped, so watcher.Stop would only be called at the end of the program, and in that case the program will exit, so no need to clean goroutines.
I was looking at other processors (docker, k8s) and the Stop functions of them are not called on the provider.
What should I do here?
|
Great addition, thank you! I added a few more questions to the PR. Could you please provide documentation or at least a description for the processors so we can add documentation for the processors? |
|
I have run Could you please resolve this issue? I assume you need to adjust the build tags. |
jorgemarey
left a comment
There was a problem hiding this comment.
I changed the build tags to fix the compiling problems.
I'm working on the tests. Sorry for the delay, I'm a little busy this days.
Where should I add the documentation?
|
Documentation should be added to the docs folder of the processor: |
| jsprocessor.RegisterPlugin("AddNomadMetadata", New) | ||
| } | ||
|
|
||
| // New constructs a new add_kubernetes_metadata processor. |
| @@ -0,0 +1,79 @@ | |||
| [[add-nomad-metadata]] | |||
| === Add Nomad metadata | |||
There was a problem hiding this comment.
Please also mark the docs beta by adding the following line:
beta[]
kvch
left a comment
There was a problem hiding this comment.
LGTM, waiting for marking it beta.
| @@ -0,0 +1 @@ | |||
| package add_nomad_metadata | |||
There was a problem hiding this comment.
don't use an underscore in package name
|
Handing it over to @elastic/integrations |
|
Hey @jorgemarey, thanks a lot for your efforts, they are very appreciated, and sorry for the delay giving feedback! As commented in #16853, let's put this PR on hold by now and let's try to move #14954 forward. #14954 includes a nomad processor, but also an autodiscover provider. |
This adds a nomad proccessor that annotates the logs with properties. Adds the following to each log:
The following is a configuration example:
The tests are missing. I'm working on them (I decided to do the PR first to do the needed changes for this to be aproved).