Skip to content
This repository has been archived by the owner on Jul 23, 2018. It is now read-only.

limit what data is collected via the config #33

Merged
merged 5 commits into from
Mar 18, 2018

Conversation

britcey
Copy link

@britcey britcey commented Feb 16, 2018

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 no collect_only specified or if it's not valid.

@Teriand
Copy link
Contributor

Teriand commented Mar 1, 2018

I fix conflicts in vmware_exporter.py after #34 in https://github.com/Teriand/vmware_exporter/commits/master
need open new PR?

@britcey
Copy link
Author

britcey commented Mar 1, 2018

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).

@britcey
Copy link
Author

britcey commented Mar 1, 2018

I've merged your changes @Teriand, thanks.

@britcey
Copy link
Author

britcey commented Mar 15, 2018

@rverchere any feedback on this? It's backwards compatible with existing configs.

Copy link
Owner

@rverchere rverchere left a comment

Choose a reason for hiding this comment

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

@britcey, @Teriand thanks, I guess there is some mistakes with the PR.

metrics.update(metric_list[s])


collect_subsystems = self._collect_subsystems(section, metric_list.keys())
Copy link
Owner

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)

Copy link
Contributor

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.

return collect_subsystems


def _collect_subsystems(self, section, valid_subsystems):
Copy link
Owner

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)

Copy link
Contributor

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.

Copy link
Author

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

Copy link
Author

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

@britcey
Copy link
Author

britcey commented Mar 16, 2018

Updated to remove duplicate code - tests out OK on my end.

@rverchere rverchere merged commit 4ee394a into rverchere:master Mar 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants