<commit_before>#
# Cookbook Name:: ganglia
# Recipe:: receiver
#
# Copyright 2016, <NAME>
#
# 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'

# Get the data sources to receive information from.
data_sources = node['ganglia']['data_sources']

packages = %w(rrdtool httpd php)
packages.each do |pkg|
  package pkg do
    action :install
  end
end

ganglia_packages = %w(ganglia-gmetad ganglia-web)
ganglia_packages.each do |pkg|
  package pkg do
    action :install
  end
end

# Create the Ganglia gmetad conf file.
# Create one data source for each item in data_sources.
template '/etc/ganglia/gmetad.conf' do
  source 'gmetad.conf.erb'
  mode '0644'
  variables(
    data_sources: data_sources)
end

# Create the Ganglia Apache conf file.
template '/etc/httpd/conf.d/ganglia.conf' do
  source 'ganglia.conf.erb'
  mode '0644'
end

directory '/var/lib/ganglia/rrds' do
  owner 'ganglia'
  group 'ganlia'
  action :create
  recursive true
end

service 'gmetad' do
  action [:enable, :start]
end

service 'httpd' do
  action [:enable, :start]
end<commit_msg>updated ganglia rrds ownership typo<commit_after>#
# Cookbook Name:: ganglia
# Recipe:: receiver
#
# Copyright 2016, <NAME>
#
# 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'

# Get the data sources to receive information from.
data_sources = node['ganglia']['data_sources']

packages = %w(rrdtool httpd php)
packages.each do |pkg|
  package pkg do
    action :install
  end
end

ganglia_packages = %w(ganglia-gmetad ganglia-web)
ganglia_packages.each do |pkg|
  package pkg do
    action :install
  end
end

# Create the Ganglia gmetad conf file.
# Create one data source for each item in data_sources.
template '/etc/ganglia/gmetad.conf' do
  source 'gmetad.conf.erb'
  mode '0644'
  variables(
    data_sources: data_sources)
end

# Create the Ganglia Apache conf file.
template '/etc/httpd/conf.d/ganglia.conf' do
  source 'ganglia.conf.erb'
  mode '0644'
end

directory '/var/lib/ganglia/rrds' do
  owner 'ganglia'
  group 'ganglia'
  action :create
  recursive true
end

service 'gmetad' do
  action [:enable, :start]
end

service 'httpd' do
  action [:enable, :start]
end
{'fraction_non_alphanumeric': 0.08996539792387544, 'fraction_numerical': 0.010066058508965083, 'mean_word_length': 4.120772946859903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2999704', 'n_tokens_mistral': 1029, 'n_tokens_neox': 995, 'n_words': 387}