无法找到 chef-client 服务

无法找到 chef-client 服务

我有一个节点核聚变安装的 cookbook 开始失败,我不太清楚为什么。在 Ubuntu 14.04 上运行

我有一个简单的方法来创建 NRPE 检查

nrpe_check "check_load" do                                                       
    command "#{node['nrpe']['plugin_dir']}/check_load"                           
    warning_condition node['inenrpe']['nrpe']['check_load']['warning_condition'] 
    critical_condition node['inenrpe']['nrpe']['check_load']['critical_condition']
    action :add                                                                  
end 

我的运行列表在此节点(不是我的 nagios 服务器)上安装了默认 NRPE 配方和我的 nrpe_check,但现在我在运行 chef-client 期间遇到查找资源的错误?我正在运行此食谱的当前版本“nrpe”:“1.6.0”

* nrpe_check[check_load] action add

    ================================================================================
    Error executing action `add` on resource 'nrpe_check[check_load]'
    ================================================================================

    Chef::Exceptions::ResourceNotFound
    ----------------------------------
    resource file[/etc/nagios/nrpe.d/check_load.cfg] is configured to notify resource service[nagios-nrpe-server] with action reload, but service[nagios-nrpe-server] cannot be found in the resource collection. file[/etc/nagios/nrpe.d/check_load.cfg] is defined in /var/chef/cache/cookbooks/nrpe/providers/check.rb:48:in `block in class_from_file'

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection.rb:45:in `find_local'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection.rb:58:in `find'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/ine-nrpe/recipes/check_load.rb

     10: nrpe_check "check_load" do
     11:     command "#{node['nrpe']['plugin_dir']}/check_load"
     12:     warning_condition node['inenrpe']['nrpe']['check_load']['warning_condition']
     13:     critical_condition node['inenrpe']['nrpe']['check_load']['critical_condition']
     14:     action :add
     15: end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/ine-nrpe/recipes/check_load.rb:10:in `from_file'

    nrpe_check("check_load") do
      action [:add]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :nrpe_check
      cookbook_name "ine-nrpe"
      recipe_name "check_load"
      command "/usr/lib/nagios/plugins/check_load"
      warning_condition "6,4,2"
      critical_condition "12,10,7"
      command_name "check_load"
    end

完全相同的设置似乎可以很好地与其他节点配合使用,所以我不确定为什么有些节点开始出现这样的失败?

相关内容