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: Add vCenter custom attributes to metrics #4955

Closed
GeckoZero opened this issue Nov 3, 2018 · 6 comments
Closed

vSphere: Add vCenter custom attributes to metrics #4955

GeckoZero opened this issue Nov 3, 2018 · 6 comments
Labels
area/vsphere feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@GeckoZero
Copy link

Feature Request

Proposal:

Wondering if it would be possible to include the custom attributes in a vCenter per datacenter/cluster/host/vm entitie if they exist. Clearly the best solution would be to have those custom attributes as tags in telegraf metrics.

Current behavior:

Custom vCenter attributes are missing.

Desired behavior:

Add custom vCenter attributes as tags to telegraf metrics.

Use case:

Managing a medium sized installation with 1000+ VMs and a lot of structured meta data in custom attributes used for filtering/billing/classification. Additionally the vSphere plugin is MUCH cleaner and ways faster than the current solution based on home-grown scripts via the exec input plugin.
The plan is to completely throw away the script collection and use the vSphere plugin if we can get access to the custom attributes.

@prydin
Copy link
Contributor

prydin commented Nov 4, 2018

I'm not against this. In fact, it's something we've discussed internally. My concern is the cardinality explosion it could cause, but if this is something optional, I think we'd be fine.

@glinton glinton added feature request Requests for new plugin and for new features to existing plugins area/vsphere labels Nov 5, 2018
@GeckoZero
Copy link
Author

Well, I thought about the very same problem and came to the conclusion that the cardinality explosion can be a problem, but only with a higher amount of custom attributes. I'm facing 13 custom attributes per entity currently and that's not much of a problem so far.
There's a another thing that worries me even more and that indeed is the description field (which is also used for meta information) because the string length is not predictable.

Your suggestion would match my idea for this problem. I would love to have something like the following config parameters:

# list of custom attributes to additionally map as metric tags per entity
custom_attributes_include = [
"aaa",
"bbb",
"ccc"
]

# wether to include the description field as metric tag and limit the length
include_entity_description = <yes|no>
max_description_length = 255

I really wonder though if it would make much sense to include the description field because that's not a usual tag thing. So I would be very happy to have the custom attributes as tags... :)

@prydin
Copy link
Contributor

prydin commented Nov 5, 2018

@GeckoZero what's your take on collection frequency? I'm thinking it's enough to collect the tags during discovery and cache them in memory. Thoughts?

@GeckoZero
Copy link
Author

@prydin those custom attributes are pretty static, so collecting them within the discovery intervall is more than enough and a good idea.

@GeckoZero
Copy link
Author

Well, we just tried 1.12.1 and the custom attribute feature works as described. Great work, thx!

@danielnelson
Copy link
Contributor

Closed in #5971

@danielnelson danielnelson added this to the 1.12.0 milestone Sep 26, 2019
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

No branches or pull requests

4 participants