• 4
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I have a node with the nrpe cookbook installed which has started failing, and I'm not exactly sure why. Running on Ubuntu 14.04

I have a simple recipe to create a NRPE check

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 

My runlist installs the default NRPE recipe and my nrpe_check on this node (which is not my nagios server) but now I'm getting an error finding a resource during my chef-client run? I'm running the current version of this cookbook "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

The exact same setup appears to work just fine w/ other nodes, so I'm not sure why a few have started failing like this?

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags