-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat: Add Stomp (Active MQ) output plugin #7995
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the new plugin! I have some change requests for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just needs work for certificate support
Readme format indentation doesn't match existing examples. Still needs more tests. (minimum one green-path test that runs as -short) |
I need more info, i think I follow the implementation of the plugin "mqtt" in correct way . |
for the test case , I have already added the min test case with green path. |
Your test case is skipped when |
Hi all , Did anyone managed to solve the merge conflict ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @amus-sal for this plugin! I have some comments and want to ask you if there is a way to mockup the ActiveMQ side for unit-testing. It would be nice to test of metrics are sent in short
testing mode...
@amus-sal any news here? |
update with the required comments |
@srebhan check now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @amus-sal! I have some more comments. Please also check the linter warnings. You can check those offline using make lint-branch
and use markdownlint
on your README.md
file.
Thanks @srebhan, check the updated pr with your suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice update @amus-sal! I have some more smaller comments... Please take a look.
plugins/outputs/stomp/stomp.go
Outdated
Username string `toml:"username,omitempty"` | ||
Password string `toml:"password,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the omitempty
setting
Username string `toml:"username,omitempty"` | |
Password string `toml:"password,omitempty"` | |
Username string `toml:"username"` | |
Password string `toml:"password"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need them as there are versions of AMQ supports integration without authentication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that's true, but in any case the value will be nil
which means an empty string. omitempty
only has an effect when serializing this struct which should never be the case actually.
Check now |
any updates ? |
any updates regarding my PR ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @amus-sal, sorry the late reply and thanks for the nice update. I have three minor comments but we are very close...
plugins/outputs/stomp/stomp.go
Outdated
Username string `toml:"username,omitempty"` | ||
Password string `toml:"password,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that's true, but in any case the value will be nil
which means an empty string. omitempty
only has an effect when serializing this struct which should never be the case actually.
Take a look at https://github.com/influxdata/telegraf/pull/7995/files if shows 23 files are changed. When you are only adding two originally. It does look like those other files contain changes we added recently. |
I did fetch upstream with the original repo and this is the output correct me if I am wrong is this right step ? |
@amus-sal looks like there are changes in this pull request that are unrelated to your Stomp output plugin, usually rebasing vs merging your changes avoids this I think. What I recommend doing is to save your changes, copy your Stomp output plugin into a separate directory and perhaps also copy this branch just in case. Then reset your branch to master, then copy your output plugin back into the branch and force push your changes. This should essentially be a manual rebase, let me know if that makes sense or if you need more help! |
@amus-sal I think your rebase went out-of-control. I suggest you save your plugin code and reset your branch to master. Then add the plugin back in. Let me know if you need help! |
can you check it now ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better! Thanks for the update @amus-sal.
go.mod
Outdated
@@ -406,3 +406,5 @@ require ( | |||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect | |||
sigs.k8s.io/yaml v1.2.0 // indirect | |||
) | |||
|
|||
require github.com/go-stomp/stomp v2.1.4+incompatible // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter is failing and I think its because of this, when I locally run go mod tidy it removes the // indirect
comment and that seems to fix it. Could you also move this to be inside the require block instead of on its own? Locally when I run go mod tidy
it puts it in line 65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but indirect related to the state if using the lib inside the module but I did an update for it but still exist, I think the problems that the plugin path "o export data for "github.com/influxdata/telegraf/plugins/outputs/stomp"\n\n" "is not yet pushed to remote repo. btw I run Golangci-lint locally and it works well with both
@amus-sal did you run |
yes I did and no changes found |
any help in that ? |
@amus-sal I see you referenced a |
I have added the sample confirmation and did make tidy and the error of lint plugin is related to other input plugins, can you check please ? |
Hi @amus-sal, Thanks for all the work on this PR! We are nearly there. @sspaink got tests running, and it looks like there is a missing license now in the docs/LICENSE_OF_DEPENDENCIES.md file because of pulling in go-stomp/stomp as a direct dependency:
Can you add that package and specify it uses the Apache License 2.0 license? Thanks! |
Thanks for all the work on this! |
Required for all PRs: