-
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: Xtremio input #9697
feat: Xtremio input #9697
Conversation
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
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 @cthiel42, thanks for submitting this nice plugin!
I have some comments in the code. Additionally, please think about your parallelization and simplify wherever possible!
@cthiel42 any update on this PR? |
Hi @srebhan. I'll make the changes hopefully in the next month or two, I just haven't had the time lately. |
@cthiel42 ok thank you, just wanted to make sure there is someone caring for this code. :-) |
@cthiel42 there are still some comments open, can you please also address those? |
@srebhan Ya I know, I'm just picking at it when I have the time. I'll get through them all eventually. |
… xmss, other code cleanup
…n due to inconsistency in the API, change how BBUs boolean metric values are set to a much cleaner way
@srebhan I commented back on a few of your comments. Can you take a look when you have the time? |
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.
@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...
…t certain variables, various formatting
…stom tls configuration handling for http client
… xmss, other code cleanup
…n due to inconsistency in the API, change how BBUs boolean metric values are set to a much cleaner way
…t certain variables, various formatting
…stom tls configuration handling for http client
…into xtremio_input
@cthiel42, please take a look at the linter issues. You can reproduce them locally by running |
@srebhan Is there anything else you need for this 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.
@cthiel42 that's just beautiful. Sorry for not getting earlier to it!
Looks good to me.
plugins/inputs/xtremio/xtremio.go
Outdated
} | ||
|
||
func (xio *XtremIO) authenticate() error { | ||
req, err := http.NewRequest("GET", xio.URL+"/api/json/v3/commands/login?password="+xio.Password+"&user="+xio.Username, nil) |
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.
Is this the only way to pass the username/password? Do these devices always use HTTPS?
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.
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.
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 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.
If basic auth (or even more advanced schemes) is supported, please use that.
🥳 This pull request decreases the Telegraf binary size by -2.67 % for linux amd64 (new size: 134.1 MB, nightly size 137.8 MB) 📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
Input plugin for XtremIO Storage Array metrics