-
Notifications
You must be signed in to change notification settings - Fork 31
limit what data is collected via the config #33
Conversation
I fix conflicts in vmware_exporter.py after #34 in https://github.com/Teriand/vmware_exporter/commits/master |
Thanks - it's been on my TODO list; either I can merge your changes into my branch & update this PR (I think), or I can close this out & you can open a new PR (I'd include my changes to the README.md and the sample config). |
I've merged your changes @Teriand, thanks. |
@rverchere any feedback on this? It's backwards compatible with existing configs. |
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.
vmware_exporter/vmware_exporter.py
Outdated
metrics.update(metric_list[s]) | ||
|
||
|
||
collect_subsystems = self._collect_subsystems(section, metric_list.keys()) |
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.
I think there is a mistake here (duplicates)
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.
It thing mistake after merge.
In my fork another 183 line.
vmware_exporter/vmware_exporter.py
Outdated
return collect_subsystems | ||
|
||
|
||
def _collect_subsystems(self, section, valid_subsystems): |
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.
I think there is a mistake here (duplicates)
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.
def _collect_subsystems
228 -248 string in fork.. strange merge.
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.
Probably a bad merge by me, let me take a peek
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.
Yikes, yeah, I'm gonna say bad merge; let me clean that up
Updated to remove duplicate code - tests out OK on my end. |
I've got the same issue as #27 - we're way too large to gather all the VM info in a timely fashion.
Added support for an optional
collect_only
setting for the config, which will limit collecting to any combination of 'vms', 'datastores' and/or 'hosts'. Will fall-back to collecting everything if nocollect_only
specified or if it's not valid.