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

vSphere: omit objects by name #5639

Closed
kkruzich opened this issue Mar 26, 2019 · 3 comments · Fixed by #6859
Closed

vSphere: omit objects by name #5639

kkruzich opened this issue Mar 26, 2019 · 3 comments · Fixed by #6859
Labels
area/vsphere feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@kkruzich
Copy link

RE: vsphere plugin

I've followed some of the discussions stemming from #5165 and read through the docs on Metric Filtering yet I'm still not clear if there's any means of excluding objects by name. For example, in listing our datastores, I see the conventions below. I want to exclude all datastores that begin with Local*

Have I overlooked something or is it not currently possible to do this?

/datastore/e612af807be232cebab3cad7d1a0b568
/datastore/LocalStorage-USPDXESX363
/datastore/LocalStorage-USPDXESX017
/datastore/845bc80751cb34cf927700f7f616dad4
/datastore/Local-LGA-ESX038
/datastore/8e7804a1a5363272b001cd74f3223d1c
/datastore/d5573007bed737dd827991b7fa1d6d76
@danielnelson
Copy link
Contributor

danielnelson commented Mar 26, 2019

We do have the datastore_include = [] option but there is no converse option so it would be difficult to exclude items, especially since this option only supports * and ** wildcards. I believe you would need:

[[inputs.vsphere]]
  # ... snip ...
  [inputs.vsphere.tagdrop]
    dsname = ["Local*"]

@prydin , do you think it might be a good idea to add a datastore_exclude = []?

As an aside, I see there are some copy/paste typo's in the README and sample config around this option, so I'll fix those.

@danielnelson danielnelson added area/vsphere discussion Topics for discussion labels Mar 27, 2019
@goller goller removed the bug unexpected problem or unintended behavior label Apr 1, 2019
@prydin
Copy link
Contributor

prydin commented May 28, 2019

Unfortunately, an exclude function is a bit tricky to implement due to the way the APIs work. I will put that on my list of things to do, but it may take a while before I get to it.

To elaborate a bit: Excluding using full paths is a major change, but we could do a simple exclude on names only. The only issue I would have with that is that include and exclude would have different semantics.

@danielnelson danielnelson added feature request Requests for new plugin and for new features to existing plugins and removed discussion Topics for discussion labels Jul 4, 2019
@prydin
Copy link
Contributor

prydin commented Jan 3, 2020

I'm working on a solution to this one. Expect a PR within the next couple of weeks or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vsphere feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants