adding monit support for nova-consoleauth (ubuntu only)

This commit is contained in:
galstrom21
2012-06-08 15:21:47 -05:00
parent 3d08e5f924
commit bad359f4b1
3 changed files with 40 additions and 0 deletions

View File

@@ -212,6 +212,10 @@ when "ubuntu"
"start" => "/usr/sbin/service nova-api-metadata start", "start" => "/usr/sbin/service nova-api-metadata start",
"stop" => "/usr/sbin/service nova-api-metadata stop" "stop" => "/usr/sbin/service nova-api-metadata stop"
}, },
"nova-consoleauth" => {
"start" => "/usr/sbin/service nova-consoleauth start",
"stop" => "/usr/sbin/service nova-consoleauth stop"
},
"libvirt-bin" => { "libvirt-bin" => {
"start" => "/usr/sbin/service libvirt-bin start", "start" => "/usr/sbin/service libvirt-bin start",
"stop" => "/usr/sbin/service libvirt-bin stop" "stop" => "/usr/sbin/service libvirt-bin stop"

View File

@@ -0,0 +1,32 @@
#
# Cookbook Name:: nova
# Recipe:: consoleauth-monitoring
#
# 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.
#
########################################
# BEGIN MONIT SECTION
# TODO(shep): This needs to be encased in an if block for the monit_enabled environment toggle
include_recipe "monit::server"
platform_options = node["nova"]["platform"]
monit_procmon "nova-consoleauth" do
process_name "nova-consoleauth"
start_cmd platform_options["monit_commands"]["nova-consoleauth"]["start"]
stop_cmd platform_options["monit_commands"]["nova-consoleauth"]["stop"]
end
########################################

View File

@@ -58,4 +58,8 @@ when "ubuntu","debian"
action :enable action :enable
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
end end
# TODO(shep): this needs to be if blocked on env collectd toggle
# Include recipe(nova::vncproxy-monitoring)
include_recipe "nova::vncproxy-monitoring"
end end