-
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 new groundwork output plugin #9891
Conversation
Thanks so much for the pull request! |
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.
Great to see a Groundwork output integrated in telegraf! I do have some comments:
Thanks so much for the pull request! |
5f8cdf9
to
ce057f6
Compare
Thanks so much for the pull request! |
Thank you for your feedback! I prepared another commit to support all your change requests |
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.
Don't forget to also update the README file with new config options, and maybe some examples of which tags should or could be present and how they will used by GW?
Note that there are also a lot of linter warnings, and you need to sign the CLA.
!signed-cla |
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 @VladislavSenkevich, I think this is a very nice and valuable PR. Thanks for the contribution!
The code currently is IMO more complex than necessary. Please get rid of most of the addon
stuff. Implement Timestamp
in a way that only the required MarshalJSON
is implemented and base it on time.Time
(as @Hipska suggested). Furthermore, fold the sendRequest()
function into the main package. The same holds for your time definitions.
cc0ca3d
to
e8f854a
Compare
e8f854a
to
3089604
Compare
@VladislavSenkevich any update here? |
We are working on a library from our Go side to avoid code duplication and will be back soon to make the plugin lighter |
This sounds amazing! I keep my fingers crossed and looking forward to the new plugin layout. |
Great! Could you maybe mark this PR as draft in the meantime? |
e30def7
to
1fb85d5
Compare
Hey @VladislavSenkevich I think you will need to recheck your last push, it seems like some find and replace messed up some other unrelated stuff.. |
1fb85d5
to
57c225f
Compare
Yes, sorry! Jusr renamed using GoLand and didn't notice changes to other files |
The tests also fail. Apart from that and the thresholds problem, all seems fine for me. |
57c225f
to
05eddb7
Compare
Thresholds problem has been fixed. The same for tests. |
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.
There is still a linter check that fails.
Note that there will be a RC release tomorrow, would be nice if the license problem could be fixed.
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 @VladislavSenkevich! There are a few comments from my side. Please also care about the markdown linter-issues...
if g.DefaultHost == "" { | ||
return errors.New("no 'default_host' provided") | ||
} | ||
if g.ResourceTag == "" { | ||
return errors.New("no 'resource_tag' provided") | ||
} | ||
if !validStatus(g.DefaultServiceState) { | ||
return errors.New("invalid 'default_service_state' provided") | ||
} |
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.
Right. Other plugins handle empty strings set by the user just as if they have set the default. In this case, you can move the default handling in here and just use the default if the string is empty, no matter if not set or explicitly set empty by the user.
This makes the code a bit cleaner, but if you insist on the present behavior, you should at least add a comment on why you do so.
05eddb7
to
fae55d2
Compare
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 like you want to keep the default handling as-is!?
Looks good from my side. Thanks @VladislavSenkevich for your effort!
Please be aware that the current license of the dependency CANNOT BE USED!
Thanks! I will conract Thomas in an hour about the license. I hope we will resolve this issue today |
@VladislavSenkevich please update the information in the |
Looks like I forgot to push... Done now |
📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
Required for all PRs: