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: Xtremio input #9697

Merged
merged 41 commits into from
Feb 1, 2022
Merged

feat: Xtremio input #9697

merged 41 commits into from
Feb 1, 2022

Conversation

cthiel42
Copy link
Contributor

  • Updated associated README.md.
  • Wrote appropriate unit tests.
  • Pull request title or commits are in conventional commit format (e.g. feat: or fix:)

Input plugin for XtremIO Storage Array metrics

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug new plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Aug 31, 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.

Hey @cthiel42, thanks for submitting this nice plugin!

I have some comments in the code. Additionally, please think about your parallelization and simplify wherever possible!

plugins/inputs/xtremio/README.md Outdated Show resolved Hide resolved
plugins/inputs/xtremio/README.md Outdated Show resolved Hide resolved
plugins/inputs/xtremio/README.md Outdated Show resolved Hide resolved
plugins/inputs/xtremio/README.md Outdated Show resolved Hide resolved
plugins/inputs/xtremio/README.md Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio_test.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Sep 14, 2021
@helenosheaa helenosheaa removed the fix pr to fix corresponding bug label Oct 4, 2021
@srebhan
Copy link
Member

srebhan commented Oct 28, 2021

@cthiel42 any update on this PR?

@cthiel42
Copy link
Contributor Author

Hi @srebhan. I'll make the changes hopefully in the next month or two, I just haven't had the time lately.

@srebhan
Copy link
Member

srebhan commented Oct 28, 2021

@cthiel42 ok thank you, just wanted to make sure there is someone caring for this code. :-)

@srebhan
Copy link
Member

srebhan commented Dec 8, 2021

@cthiel42 there are still some comments open, can you please also address those?

@cthiel42
Copy link
Contributor Author

cthiel42 commented Dec 8, 2021

@srebhan Ya I know, I'm just picking at it when I have the time. I'll get through them all eventually.

@cthiel42
Copy link
Contributor Author

@srebhan I commented back on a few of your comments. Can you take a look when you have the time?

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.

@cthiel42 nice update, thanks! I have some more comments. Please also run make fmt to pass CI tests. One remaining thing is the nested go-routines. I do understand your target, but I wonder if e.g. first querying all collectors (in parallel), then construct the sub-queries and run the subqueries (in parallel) wouldn't be a more clean approach. However, I can live with the current structure as long as you document the intention behind nesting the go-routines in the code...

plugins/inputs/xtremio/testdata_test.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
plugins/inputs/xtremio/xtremio.go Outdated Show resolved Hide resolved
@srebhan
Copy link
Member

srebhan commented Jan 11, 2022

@cthiel42, please take a look at the linter issues. You can reproduce them locally by running make lint-branch.

@cthiel42
Copy link
Contributor Author

@srebhan Is there anything else you need for this PR?

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.

@cthiel42 that's just beautiful. Sorry for not getting earlier to it!

Looks good to me.

@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 Jan 24, 2022
}

func (xio *XtremIO) authenticate() error {
req, err := http.NewRequest("GET", xio.URL+"/api/json/v3/commands/login?password="+xio.Password+"&user="+xio.Username, nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the only way to pass the username/password? Do these devices always use HTTPS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are generally going to be handled over HTTPS and likely using private IPs, but I guess that decision is ultimately up to whoever is managing the storage array. So it's possible they could be passed over HTTP.

I can also do basic auth, which probably makes more sense than query string params. Let me know if you want me to switch that over to basic auth and I can push the code. I already have it written.

Copy link
Contributor

Choose a reason for hiding this comment

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

@srebhan @reimda thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

If basic auth (or even more advanced schemes) is supported, please use that.

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Feb 1, 2022

@powersj powersj merged commit 6dc8e9d into influxdata:master Feb 1, 2022
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.

4 participants