[chef] Re: environments within nagios


Chronological Thread 
  • From: Tim Smith < >
  • To:
  • Subject: [chef] Re: environments within nagios
  • Date: Tue, 3 Sep 2013 15:38:19 -0700

The nagios cookbook does per environment monitoring using Chef environments.  Instead of creating a development and production role, create a development and production environment.  Stick the nodes in the appropriate environment and then you should see isolated nagios servers that only monitor nodes in their own environment.

Limelight Networks
Tim Smith  - Systems Engineer 
m: +1 707.738.8132




I've created (2) roles:

development.rb

name "development"
description "Nodes in the development environment."
default_attributes(
 "app_environment" => "development"



production.rb

name "production"
description "Nodes in the production environment."
default_attributes(
 "app_environment" => "production"
)


When I deployed a development nagios server, it added all the required hosts
while giving it the "development" role. However, when i deployed a production
nagios server, it ALSO added the "development" role servers. In theory, this
should be empty since I have never rolled out a client server with a
"production" role. What am I doing wrong here?

I did notice that when i did knife node edit, it shows the default environment:

{
 "name": "localhost.localdomain",
 "chef_environment": "_default",
 "normal": {
   "tags": [

   ]
 },
 "run_list": [
   "role[monitoring]",
   "role[production]",
   "role[localhost]",
   "role[base_linux]"
 ]
}




Archive powered by MHonArc 2.6.16.

§