Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Forked from btm/node.rb
Created April 14, 2009 19:20
Show Gist options
  • Save jtimberman/95375 to your computer and use it in GitHub Desktop.
Save jtimberman/95375 to your computer and use it in GitHub Desktop.
#
# Author:: Bryan McLellan <btm@loftninjas.org>
# Cookbook Name:: ganglia
# Recipe:: default
#
# Copyright 2008, Bryan McLellan
#
# 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 "ganglia::modules"
route "239.2.11.71" do
device "eth0"
end
package "ganglia-monitor" do
action :install
end
service "ganglia-monitor" do
pattern "gmond"
end
template "ganglia-monitor_config" do
name value_for_platform(
[ "ubuntu", "debian" ] => {
"9.04" => "/etc/gmond.conf",
"default" => "/etc/ganglia/gmond.conf"
}
)
source "gmond.conf.erb"
mode 0644
owner "root"
group "root"
notifies :restart, resources(:service => "ganglia-monitor")
variables(
:ganglia_cluster_name => node[:ganglia_cluster_name],
:ganglia_cluster_port => node[:ganglia_cluster_port],
:ganglia_mcast_send => node[:ganglia_mcast_send],
:ganglia_mcast_recv => node[:ganglia_mcast_recv],
:ganglia_mcast_if => node[:ganglia_mcast_if]
)
end
service "ganglia-monitor" do
pattern "gmond"
action [ :enable, :start]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment