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

feat: Openstack input plugin #9236

Merged
merged 28 commits into from
Nov 9, 2021
Merged

feat: Openstack input plugin #9236

merged 28 commits into from
Nov 9, 2021

Conversation

singamSrikar
Copy link
Contributor

@singamSrikar singamSrikar commented May 4, 2021

added openstack input plugin to gather metrics from openstack services

Required for all PRs:

  • Updated associated README.md.
  • Wrote appropriate unit tests.

resolves #243

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin new plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels May 4, 2021
@singamSrikar
Copy link
Contributor Author

Hi @sjwang90 and @srebhan ,
This is the new PR for openstack input plugin.

@sjwang90
Copy link
Contributor

sjwang90 commented May 7, 2021

Thanks @singamSrikar. We'll get a review on this PR.

@sjwang90 sjwang90 changed the title added openstack input plugin to gather metrics from openstack services Openstack input plugin May 7, 2021
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @singamSrikar for the contribution. The only issue I see is the missing tests, but given the code I guess it is not easily possible to mock some stack responses, is it?

@singamSrikar
Copy link
Contributor Author

Looks good to me. Thanks @singamSrikar for the contribution. The only issue I see is the missing tests, but given the code I guess it is not easily possible to mock some stack responses, is it?

yeah, that is right. There are few applications which can mock the Openstack APIs but that would be an additional dependency.

@srebhan
Copy link
Member

srebhan commented Oct 19, 2021

@singamSrikar TBH I think the additional dependency is well spent. Can you please add such a test-case as it will probably trap changes in telegraf that might break this plugin and eases the live of all other devs.

@srebhan
Copy link
Member

srebhan commented Oct 19, 2021

Oh and we do have linter warnings again... :-S

@singamSrikar
Copy link
Contributor Author

@singamSrikar TBH I think the additional dependency is well spent. Can you please add such a test-case as it will probably trap changes in telegraf that might break this plugin and eases the live of all other devs.

I have checked the Openstack api mimic but looks like it doesn't have latest api version support, which we are using, and it requires us to run a system level service with ports enabled to mimic.

@srebhan
Copy link
Member

srebhan commented Oct 19, 2021

Is there a docker container for this mockup? If so, we should add a test-case in non-short mode. Take a look at e.g. https://github.com/influxdata/telegraf/blob/master/plugins/inputs/sql/sql_test.go on how to do it.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the linter warnings.

@singamSrikar
Copy link
Contributor Author

Is there a docker container for this mockup? If so, we should add a test-case in non-short mode. Take a look at e.g. https://github.com/influxdata/telegraf/blob/master/plugins/inputs/sql/sql_test.go on how to do it.

I have checked but there is no mockup that would work here.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Unfortunately, we have to live without tests as there seems to be no mockup...

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Oct 22, 2021
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for this! This is great.

I do want the warning about cardinality/# of tags to be more prominent in the readme. can you update that with my items and then look at my other comment about status?

Thanks!

plugins/inputs/openstack/openstack.go Outdated Show resolved Hide resolved
plugins/inputs/openstack/openstack.go Show resolved Hide resolved
plugins/inputs/openstack/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there :)

plugins/inputs/openstack/README.md Outdated Show resolved Hide resolved
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Nov 1, 2021

@singamSrikar
Copy link
Contributor Author

Almost there :)

Hey @powersj, I have added the changes as suggested to README doc, please take a look and let me know if any changes are required.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy when you are... ;-)

@MyaLongmire MyaLongmire merged commit a288bc0 into influxdata:master Nov 9, 2021
@yankcrime
Copy link

I can't help but feel like a nod to the original author of a large part of this plugin, @spjmurray, would've been the right thing to do here - especially since he unsuccessfully attempted to shepherd the original PR for several years before eventually giving up due to lack of traction on the InfluxData side.

@srebhan
Copy link
Member

srebhan commented Nov 10, 2021

Hey @yankcrime, I'm sorry for this lurking around so long (though I'm not with InfluxData). As you might have noticed I tried to reactivate the "old" PR, but unfortunately the original author did not react on any of my attempts. This PR was linked to the original one and I really appreciate the work @spjmurray put into this, but I have no means to reach him beside Github comments...
So sorry if this feels disrespectful, it never was meant like this!

VladislavSenkevich pushed a commit to gwos/telegraf that referenced this pull request Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add OpenStack plugin
7 participants