This issue has been migrated from Redmine: https://dev.icinga.com/issues/12994
Created by Kwisatx on 2016-10-27 14:35:35 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-10-27 14:35:35 +00:00 (in Redmine)
Hello,
I've been trying to use the icinga2_checkcommand LWRP, and I've run across an issue with the generated CheckCommand object.
icinga2_checkcommand 'check_redis_memory' do
command ["\"#{node['icinga2']['custom_plugins_dir']}/check_redis\"", "\"used_memory\""]
arguments "-H" => "$address$", "-p" => "$port$"
end
will generate an object with a missing comma:
object CheckCommand "check_redis_memory" {
import "plugin-check-command"
command = [
"/opt/icinga2_custom_plugins/check_redis" << There should be a comma here according to icinga2
"used_memory"
]
arguments = {
"-H" = "$address$"
"-p" = "$port$"
}
}
From what I can see, this is the behavior coded in https://github.com/Icinga/chef-icinga2/blob/master/templates/default/object.checkcommand.conf.erb.
Am I missing something, or should we be adding commas when treating options['command']?
I've worked around the issue by taking advantage of the fact that a layer of quotation marks is stripped from the command to add the comma in the first layer of quotation marks (["\"#{node['icinga2']['custom_plugins_dir']}/check_redis\",", "\"used_memory\""]) but this does not seem ideal.
Thanks!
This issue has been migrated from Redmine: https://dev.icinga.com/issues/12994
Created by Kwisatx on 2016-10-27 14:35:35 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-10-27 14:35:35 +00:00 (in Redmine)
Hello,
I've been trying to use the icinga2_checkcommand LWRP, and I've run across an issue with the generated CheckCommand object.
will generate an object with a missing comma:
From what I can see, this is the behavior coded in https://github.com/Icinga/chef-icinga2/blob/master/templates/default/object.checkcommand.conf.erb.
Am I missing something, or should we be adding commas when treating options['command']?
I've worked around the issue by taking advantage of the fact that a layer of quotation marks is stripped from the command to add the comma in the first layer of quotation marks (["\"#{node['icinga2']['custom_plugins_dir']}/check_redis\",", "\"used_memory\""]) but this does not seem ideal.
Thanks!