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

Using a reference to icinga variable in icinga2::object::notification $interval #443

Closed
triforce opened this issue May 1, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@triforce
Copy link

triforce commented May 1, 2018

There is a regex validation check on the $interval variable in the icinga2::object::notification resource type, however this could potentially contain just a string with reference to an icinga variable, such as "service.vars.notification.interval" causing the validation check to fail.

Current Behavior

validate_re() on $interval fails when checking against reference to icinga variable.

Possible Solution

  • Extended the regex to something like (^\d+(\.\d+)?[dhms]?$|(service|host)\.vars.*)
    OR
  • Add a $custom_cfg array parameter into the icinga2::object and all object types (notification, host, user etc) allowing a user (at their own risk) to add custom configuration.
    OR
  • Replace the validate_re() with validate_string() on the $interval variable.

Your Environment

  • Module version: 1.3.5
  • Puppet version: 4.10.8
  • Operating System and version: Debian 9
@lbetz lbetz added the bug label May 1, 2018
@triforce
Copy link
Author

I can make this code change - Any of those solutions work for you? If not please suggest another.

triforce added a commit to triforce/puppet-icinga2 that referenced this issue Jul 12, 2018
@lbetz lbetz self-assigned this Sep 13, 2018
@lbetz lbetz added this to the v2.0.0 milestone Sep 13, 2018
lbetz added a commit that referenced this issue Sep 13, 2018
@lbetz lbetz closed this as completed Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants