We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a data field looking like something like this:
{ "name" => "Name". "parameter1" => 123, "parameter2" => 456 }
I use it in an Service Apply Rule with Apply For.
I set the following: Service Name: Check $config.name$ Custom Properties: Property 1 => $config.parameter1$ and Property 2 => $config.parameter2$
Check $config.name$
$config.parameter1$
$config.parameter2$
I expect the Service to be named Check Name and the properties to be set to 123 and 456 respectively.
Check Name
123
456
The Service gets named correctly. The two properties will be populated with the String "$config.parameter1$" and "$config.parameter2$".
"$config.parameter1$"
"$config.parameter2$"
The check will report as UNKNOWN with this error: Error: Non-optional macro 'config.parameter1' used in argument 'parameter1' is missing.
Error: Non-optional macro 'config.parameter1' used in argument 'parameter1' is missing.
It seems the macro is expanded at a later point, which is not possible anymore since context is missing.
Allow for specifying parameters in Custom Properties. At the moment only $config$ is allowed in https://github.com/Icinga/icingaweb2-module-director/blob/master/library/Director/CustomVariable/CustomVariableString.php#L49 but this will fill in my entire object.
$config$
The text was updated successfully, but these errors were encountered:
I would like to look into fixing this issue if nothing speaks against it. Has a PR the prospect of being merged?
Sorry, something went wrong.
I see two easy ways to circumvent this issue:
['config']
Solution (1) works fine for my use case, but may break other peoples setup?
Successfully merging a pull request may close this issue.
Expected Behavior
I have a data field looking like something like this:
I use it in an Service Apply Rule with Apply For.
I set the following:
Service Name:
Check $config.name$
Custom Properties: Property 1 =>
$config.parameter1$
and Property 2 =>$config.parameter2$
I expect the Service to be named
Check Name
and the properties to be set to123
and456
respectively.Current Behavior
The Service gets named correctly.
The two properties will be populated with the String
"$config.parameter1$"
and"$config.parameter2$"
.The check will report as UNKNOWN with this error:
Error: Non-optional macro 'config.parameter1' used in argument 'parameter1' is missing.
It seems the macro is expanded at a later point, which is not possible anymore since context is missing.
Possible Solution
Allow for specifying parameters in Custom Properties. At the moment only
$config$
is allowed in https://github.com/Icinga/icingaweb2-module-director/blob/master/library/Director/CustomVariable/CustomVariableString.php#L49 but this will fill in my entire object.Your Environment
The text was updated successfully, but these errors were encountered: