Merge pull request #65 from rpedde-rcbops/mysql-monitoring

process monitoring for mysql
This commit is contained in:
Justin Shepherd 2012-06-07 12:47:41 -07:00
commit c41a93ba08
4 changed files with 46 additions and 4 deletions

View File

@ -112,7 +112,13 @@ when "fedora"
"libvirt_service" => "libvirtd",
"common_packages" => ["openstack-nova"],
"iscsi_helper" => "ietadm",
"package_overrides" => ""
"package_overrides" => "",
"monit_commands" => {
"mysqld" => {
"start" => "/usr/sbin/service mysqld start",
"stop" => "/usr/sbin/service mysqld stop"
}
}
}
when "ubuntu"
default["nova"]["platform"] = {
@ -140,6 +146,13 @@ when "ubuntu"
"libvirt_service" => "libvirt-bin",
"common_packages" => ["nova-common"],
"iscsi_helper" => "tgtadm",
"package_overrides" => "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'"
"package_overrides" => "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'",
"monit_commands" => {
"mysqld" => {
"start" => "/usr/sbin/service mysql start",
"stop" => "/usr/sbin/service mysql stop"
}
}
}
end

View File

@ -10,6 +10,6 @@ version "1.0.5"
supports os
end
%w{ apt collectd-graphite database glance keystone mysql openssh rabbitmq selinux osops-utils }.each do |dep|
%w{ apt collectd-graphite database glance keystone mysql openssh rabbitmq selinux osops-utils monit }.each do |dep|
depends dep
end

30
recipes/nova-db.rb Normal file
View File

@ -0,0 +1,30 @@
#
# Cookbook Name:: nova
# Recipe:: nova-db
#
# Copyright 2009, Rackspace Hosting, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe "nova::nova-common"
include_recipe "monit::server"
include_recipe "mysql::server"
platform_options = node["nova"]["platform"]
monit_procmon "mysqld" do
process_name "mysqld"
start_cmd platform_options["monit_commands"]["mysqld"]["start"]
stop_cmd platform_options["monit_commands"]["mysqld"]["stop"]
end

View File

@ -25,7 +25,6 @@ include_recipe "collectd-graphite::collectd-client"
# First, let's monitor mysql
# this gets me credentials, still need per-role info on db name
mysql_info = get_settings_by_role("mysql-master", "mysql")