[chef] Re: Issue with datadog mysql


Chronological Thread 
  • From: Jose Luis Ferrer < >
  • To:
  • Subject: [chef] Re: Issue with datadog mysql
  • Date: Thu, 20 Nov 2014 11:55:48 +0100

Hello,

It seems that your node['datadog']['mysql']['instances'] attribute is empty, you have to declare it somewhere (role, or your wrapper cookbook), see https://github.com/DataDog/chef-datadog/blob/master/recipes/mysql.rb#L5 for the connection parameters you have to include.

e.g. declaring the instance in your wrapper recipe :

```
node.default['datadog']['mysql']['instances']= [
 {
   ##your instances object here ##
 }
]

include_recipe "datadog::mysql"
```

Regards,

JL


On Thu, Nov 20, 2014 at 11:30 AM, koteswara rao Sakhamuri < " target="_blank"> > wrote:
Hi Chefs,
I'm facing issue with mysql in datadog. Please help me to find out the solution. Am i doing anything wrong? od do i have to include the information of DB like database credentials etc.

========================================================
192.168.204.75
192.168.204.75 NoMethodError
192.168.204.75 -------------
192.168.204.75 undefined method `[]' for nil:NilClass
192.168.204.75
192.168.204.75 Cookbook Trace:
192.168.204.75 ---------------
192.168.204.75   /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:24:in `block in from_file'
192.168.204.75   /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:23:in `from_file'
192.168.204.75   /var/chef/cache/cookbooks/keas-datadog/recipes/mysql.rb:3:in `from_file'
192.168.204.75   /var/chef/cache/cookbooks/keas-percona/recipes/default.rb:19:in `from_file'
192.168.204.75
192.168.204.75 Relevant File Content:
192.168.204.75 ----------------------
192.168.204.75 /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:
192.168.204.75
192.168.204.75  17:  #       "replication: 0",
192.168.204.75  18:  #       "galera_cluster: 1"
192.168.204.75  19:  #     ]
192.168.204.75  20:  #   },
192.168.204.75  21:  # ]
192.168.204.75  22:
192.168.204.75  23:  datadog_monitor 'mysql' do
192.168.204.75  24>>   instances node['datadog']['mysql']['instances']
192.168.204.75  25:  end
192.168.204.75  26:
192.168.204.75  27:
192.168.204.75  28:
192.168.204.75
192.168.204.75
192.168.204.75 Running handlers:
192.168.204.75 [2014-11-20T15:50:04+05:30] ERROR: Running exception handlers
192.168.204.75 Running handlers complete
192.168.204.75 [2014-11-20T15:50:04+05:30] ERROR: Exception handlers complete
192.168.204.75 [2014-11-20T15:50:04+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.204.75 Chef Client failed. 0 resources updated in 2.890363666 seconds
192.168.204.75 [2014-11-20T15:50:04+05:30] ERROR: undefined method `[]' for nil:NilClass
192.168.204.75 [2014-11-20T15:50:04+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsucce
sfully (exit code 1)


Regards,
Sakhamuri.




Archive powered by MHonArc 2.6.16.

§