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

feature: enable renaming of applied related vars during basket imports #2910

Open
NavidSassan opened this issue Aug 14, 2024 · 0 comments
Open

Comments

@NavidSassan
Copy link

Let's say I have the datafield load_warning = 80 set on one of my hosts. Now there has been a change in the check plugin that has changed the parameter to, for example, --warning15. There is an associated basket which now contains the load_warning15 datafield. As the UUID of these datafields is the same, the datafield is correctly renamed to load_warning15 (this already works).

Current Behavior

Currently, the applied variable on my host is not renamed and remains load_warning.

Expected Behavior

Ideally, the Director offers the option to also rename the applied variables during the import.

Possible Solution

  • Adding a toggle in the webgui and the cli, and allowing the user to choose the behavior during the import.
  • Preferred: Extending the basket with a "BasketConfig" element, that offers options for the import process itself. This allows the creator of the basket to set options that make sense for their use case. In the future, this could also be extended with other options.

The Linuxfabrik Fork of the Icinga Director implements automatic renaming of related vars, but does not offer the choice to the user. See 7c95a72

Steps to Reproduce

  • Import rename-related-vars1.json
  • Create a host which has the custom variable applied and contains a value: icingacli director host create host1 --imports ___TEST___host_template1 --vars.___TEST___datafield1 'myvalue1'
  • Import rename-related-vars2.json
  • During this import the variable was renamed from ___TEST___datafield1 to ___TEST___datafield1-renamed.
  • Have a look at the applied variable: icingacli director host show host1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant