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

Add option to use user-defined Collector template #124

Closed
vgratian opened this issue Jun 8, 2021 · 1 comment
Closed

Add option to use user-defined Collector template #124

vgratian opened this issue Jun 8, 2021 · 1 comment
Labels
feature New feature or request priority/P1

Comments

@vgratian
Copy link
Contributor

vgratian commented Jun 8, 2021

Is your feature request related to a problem? Please describe.
Currently they way poller loads and merges the templates of a Collector is hardcoded:

  • First, poller loads conf/<collector>/default.yaml
  • Second, if exists, it loads conf/<collector>/custom.yaml and merges to default.

Users can create conf/<collector>/custom.yaml and add additional objects they want to collect. But they can't:

  • disable objects that are already defined in conf/<collector>/default.yaml
  • create multiple custom templates and apply to different pollers

Of course, it is possible is to customize conf/<collector>/default.yaml, but this way changes need to be re-applied after each update of Harvest.

Describe the solution you'd like
Add the option to add list of (custom) templates in the collectors: parameter in the Pollers: section of harvest.yml.

Describe alternatives you've considered
Another possible solution is to add a Collectors: section to harvest.yml where you define different configurations of the same collector in the same way we do with exporters. But I think this is much more work than adding a single parameter.

Additional context
In Harvest 2.0 Alpha (Python version) a similar parameter was implemented. The collectors: section could be expanded to with any (valid) collector parameters. E.g.:

Pollers:

  shopfloor:
    datacenter: Walldorf
    url: 10.0.0.2
    exporters:
      - prometheus01
    collectors:
      Zapi:
        templates:
           - custom2.yaml
@cgrinds
Copy link
Collaborator

cgrinds commented Oct 27, 2021

Covered by #555 and #505

@cgrinds cgrinds closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request priority/P1
Projects
None yet
Development

No branches or pull requests

3 participants