Removed all the "jah"
This commit is contained in:
parent
eb20ee906c
commit
cc49f14018
@ -1,59 +1,59 @@
|
||||
# Add tags as override attributes in your role
|
||||
default['jahmon-agent']['tags'] = ""
|
||||
default['mon-agent']['tags'] = ""
|
||||
|
||||
# Datadog defaults
|
||||
default['jahmon-agent']['send_to_datadog'] = "no"
|
||||
default['jahmon-agent']['dd_url'] = "https://app.datadoghq.com"
|
||||
default['jahmon-agent']['api_key'] = ""
|
||||
default['jahmon-agent']['collect_ec2_tags'] = "no"
|
||||
default['mon-agent']['send_to_datadog'] = "no"
|
||||
default['mon-agent']['dd_url'] = "https://app.datadoghq.com"
|
||||
default['mon-agent']['api_key'] = ""
|
||||
default['mon-agent']['collect_ec2_tags'] = "no"
|
||||
|
||||
# Repository configuration
|
||||
default['jahmon-agent']['installrepo'] = true
|
||||
default['jahmon-agent']['aptrepo'] = "http://apt.datadoghq.com"
|
||||
default['jahmon-agent']['yumrepo'] = "http://yum.datadoghq.com/rpm"
|
||||
default['mon-agent']['installrepo'] = true
|
||||
default['mon-agent']['aptrepo'] = "http://apt.datadoghq.com"
|
||||
default['mon-agent']['yumrepo'] = "http://yum.datadoghq.com/rpm"
|
||||
|
||||
# Agent Version
|
||||
default['jahmon-agent']['agent_version'] = nil
|
||||
default['mon-agent']['agent_version'] = nil
|
||||
|
||||
# Boolean to enable debug_mode, which outputs massive amounts of log messages
|
||||
# to the /tmp/ directory.
|
||||
default['jahmon-agent']['debug'] = false
|
||||
default['mon-agent']['debug'] = false
|
||||
|
||||
# How often you want the agent to collect data, in seconds. Any value between
|
||||
# 15 and 60 is a reasonable interval.
|
||||
default['jahmon-agent']['check_freq'] = 15
|
||||
default['mon-agent']['check_freq'] = 15
|
||||
|
||||
# If running on ec2, if true, use the instance-id as the host identifier
|
||||
# rather than the hostname for the agent or nodename for chef-handler.
|
||||
default['jahmon-agent']['use_ec2_instance_id'] = false
|
||||
default['mon-agent']['use_ec2_instance_id'] = false
|
||||
|
||||
# Use mount points instead of volumes to track disk and fs metrics
|
||||
default['jahmon-agent']['use_mount'] = false
|
||||
default['mon-agent']['use_mount'] = false
|
||||
|
||||
# Change port the agent is listening to
|
||||
default['jahmon-agent']['agent_port'] = 17123
|
||||
default['mon-agent']['agent_port'] = 17123
|
||||
|
||||
# Start a graphite listener on this port
|
||||
# https://github.com/DataDog/dd-agent/wiki/Feeding-Datadog-with-Graphite
|
||||
default['jahmon-agent']['graphite'] = false
|
||||
default['jahmon-agent']['graphite_port'] = 17124
|
||||
default['mon-agent']['graphite'] = false
|
||||
default['mon-agent']['graphite_port'] = 17124
|
||||
|
||||
# log-parsing configuration
|
||||
default['jahmon-agent']['dogstreams'] = []
|
||||
default['mon-agent']['dogstreams'] = []
|
||||
|
||||
# Logging configuration
|
||||
default['jahmon-agent']['syslog']['active'] = false
|
||||
default['jahmon-agent']['syslog']['udp'] = false
|
||||
default['jahmon-agent']['syslog']['host'] = nil
|
||||
default['jahmon-agent']['syslog']['port'] = nil
|
||||
default['mon-agent']['syslog']['active'] = false
|
||||
default['mon-agent']['syslog']['udp'] = false
|
||||
default['mon-agent']['syslog']['host'] = nil
|
||||
default['mon-agent']['syslog']['port'] = nil
|
||||
|
||||
default['jahmon-agent']['mon_api_url'] = nil
|
||||
default['jahmon-agent']['mon_api_project_id'] = nil
|
||||
default['jahmon-agent']['mon_api_username'] = nil
|
||||
default['jahmon-agent']['mon_api_password'] = nil
|
||||
default['jahmon-agent']['use_keystone'] = nil
|
||||
default['jahmon-agent']['keystone_url'] = nil
|
||||
default['jahmon-agent']['aggregate_metrics'] = nil
|
||||
node.default['jahmon_agent']['group'] = "root"
|
||||
node.default['jahmon_agent']['owner'] = "jahmon-agent"
|
||||
node.default['jahmon_agent']['data_bag'] = "jahmon_agent"
|
||||
default['mon-agent']['mon_api_url'] = nil
|
||||
default['mon-agent']['mon_api_project_id'] = nil
|
||||
default['mon-agent']['mon_api_username'] = nil
|
||||
default['mon-agent']['mon_api_password'] = nil
|
||||
default['mon-agent']['use_keystone'] = nil
|
||||
default['mon-agent']['keystone_url'] = nil
|
||||
default['mon-agent']['aggregate_metrics'] = nil
|
||||
node.default['mon_agent']['group'] = "root"
|
||||
node.default['mon_agent']['owner'] = "mon-agent"
|
||||
node.default['mon_agent']['data_bag'] = "mon_agent"
|
||||
|
@ -1,4 +1,4 @@
|
||||
default['jahmon-agent']['network']['instances'] = [
|
||||
default['mon-agent']['network']['instances'] = [
|
||||
{
|
||||
'collect_connection_state' => 'false',
|
||||
'excluded_interfaces' => ['lo', 'lo0']
|
||||
|
@ -2,45 +2,45 @@
|
||||
|
||||
# Host alive check for api server
|
||||
|
||||
node.default[:jahmon_agent][:plugin][:jahmon_host_alive][:init_config] = {
|
||||
node.default[:mon_agent][:plugin][:mon_host_alive][:init_config] = {
|
||||
:ssh_port => 22,
|
||||
:ssh_timeout => 0.5,
|
||||
:ping_timeout => 1
|
||||
}
|
||||
|
||||
node.default[:jahmon_agent][:plugin][:jahmon_host_alive][:instances][:api_with_ssh] = {
|
||||
node.default[:mon_agent][:plugin][:mon_host_alive][:instances][:api_with_ssh] = {
|
||||
:host_name => "192.168.10.4",
|
||||
:alive_test => "ssh"
|
||||
}
|
||||
|
||||
# Process checks: Everyone should be running ssh/sshd and ntpd
|
||||
|
||||
node.default[:jahmon_agent][:plugin][:process][:init_config] = {
|
||||
node.default[:mon_agent][:plugin][:process][:init_config] = {
|
||||
}
|
||||
|
||||
node.default[:jahmon_agent][:plugin][:process][:instances][:ssh] = {
|
||||
node.default[:mon_agent][:plugin][:process][:instances][:ssh] = {
|
||||
:name => "ssh",
|
||||
:search_string => ["ssh", "sshd"]
|
||||
}
|
||||
node.default[:jahmon_agent][:plugin][:process][:instances][:ntpd] = {
|
||||
node.default[:mon_agent][:plugin][:process][:instances][:ntpd] = {
|
||||
:name => "ntpd",
|
||||
:search_string => ["/usr/sbin/ntpd"],
|
||||
:exact_match => "True"
|
||||
}
|
||||
|
||||
# Service checks: For demo, everyone can check jahmon api
|
||||
# Service checks: For demo, everyone can check mon api
|
||||
|
||||
node.default[:jahmon_agent][:plugin][:jahmon_http_check][:init_config] = {
|
||||
node.default[:mon_agent][:plugin][:mon_http_check][:init_config] = {
|
||||
}
|
||||
|
||||
node.default[:jahmon_agent][:plugin][:jahmon_http_check][:instances][:monapi] = {
|
||||
node.default[:mon_agent][:plugin][:mon_http_check][:instances][:monapi] = {
|
||||
:name => "mon_api",
|
||||
:url => "http://192.168.10.4:8080",
|
||||
:timeout => 10,
|
||||
:collect_response_time => "true",
|
||||
:match_pattern => '.*status.*CURRENT.*',
|
||||
}
|
||||
node.default[:jahmon_agent][:plugin][:jahmon_http_check][:instances][:monapi_health] = {
|
||||
node.default[:mon_agent][:plugin][:mon_http_check][:instances][:monapi_health] = {
|
||||
:name => "mon_api_health",
|
||||
:url => "http://192.168.10.4:8081/healthcheck",
|
||||
:timeout => 10,
|
||||
@ -49,13 +49,13 @@ node.default[:jahmon_agent][:plugin][:jahmon_http_check][:instances][:monapi_hea
|
||||
:match_pattern => '.*"healthy":true.*"healthy":true.*"healthy":true.*',
|
||||
}
|
||||
|
||||
# jahmon_nagios_wrapper checks: For demo, everyone can check disk
|
||||
# mon_nagios_wrapper checks: For demo, everyone can check disk
|
||||
|
||||
node.default[:jahmon_agent][:plugin][:jahmon_nagios_wrapper][:init_config] = {
|
||||
node.default[:mon_agent][:plugin][:mon_nagios_wrapper][:init_config] = {
|
||||
:check_path => "/usr/lib/nagios/plugins:/usr/local/bin/nagios"
|
||||
}
|
||||
|
||||
node.default[:jahmon_agent][:plugin][:jahmon_nagios_wrapper][:instances][:check_disk] = {
|
||||
node.default[:mon_agent][:plugin][:mon_nagios_wrapper][:instances][:check_disk] = {
|
||||
:service_name => "disk",
|
||||
:check_command => "check_disk -w 15\\% -c 5\\% -A -i /srv/node",
|
||||
:check_interval => 300
|
||||
|
@ -1,7 +1,7 @@
|
||||
name "jahmon_agent"
|
||||
name "mon_agent"
|
||||
maintainer "HP_Cloud_Monitoring"
|
||||
maintainer_email "hpcs-mon@hp.com"
|
||||
description "Installs/Configures jahmon-agent components"
|
||||
description "Installs/Configures mon-agent components"
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version "1.0"
|
||||
|
||||
@ -13,4 +13,4 @@ end
|
||||
|
||||
suggests "python"
|
||||
|
||||
recipe "jahmon_api::default", "Default"
|
||||
recipe "mon_api::default", "Default"
|
||||
|
@ -4,48 +4,48 @@
|
||||
#
|
||||
|
||||
# Agent configuration
|
||||
package 'jahmon-agent' do
|
||||
package 'mon-agent' do
|
||||
action :purge
|
||||
end
|
||||
|
||||
package 'jahmon-agent' do
|
||||
package 'mon-agent' do
|
||||
action :install
|
||||
end
|
||||
|
||||
cookbook_file '/usr/share/datadog/agent/datadog-cert.pem' do
|
||||
action :create
|
||||
owner node['jahmon_agent']['owner']
|
||||
group node['jahmon_agent']['group']
|
||||
owner node['mon_agent']['owner']
|
||||
group node['mon_agent']['group']
|
||||
mode '644'
|
||||
source 'datadog-cert.pem'
|
||||
end
|
||||
|
||||
directory "/var/log/jahmon-agent" do
|
||||
directory "/var/log/mon-agent" do
|
||||
recursive true
|
||||
owner node['jahmon_agent']['owner']
|
||||
group node['jahmon_agent']['group']
|
||||
owner node['mon_agent']['owner']
|
||||
group node['mon_agent']['group']
|
||||
mode 0777
|
||||
action :create
|
||||
end
|
||||
|
||||
service 'jahmon-agent' do
|
||||
service 'mon-agent' do
|
||||
action :enable
|
||||
provider Chef::Provider::Service::Init::Debian
|
||||
end
|
||||
|
||||
setting = data_bag_item(node[:jahmon_agent][:data_bag], 'jahmon_agent')
|
||||
setting = data_bag_item(node[:mon_agent][:data_bag], 'mon_agent')
|
||||
|
||||
template "/etc/dd-agent/datadog.conf" do
|
||||
action :create
|
||||
owner node['jahmon_agent']['owner']
|
||||
group node['jahmon_agent']['group']
|
||||
owner node['mon_agent']['owner']
|
||||
group node['mon_agent']['group']
|
||||
mode '644'
|
||||
source "datadog.conf.erb"
|
||||
variables(
|
||||
:setting => setting
|
||||
)
|
||||
notifies :restart, "service[jahmon-agent]"
|
||||
notifies :restart, "service[mon-agent]"
|
||||
end
|
||||
|
||||
include_recipe 'jahmon_agent::plugin_cfg'
|
||||
include_recipe 'mon_agent::plugin_cfg'
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
#
|
||||
# Cookbook Name:: jahmon_agent
|
||||
# Cookbook Name:: mon_agent
|
||||
# Recipe:: plugin_cfg
|
||||
#
|
||||
|
||||
# Common configuration
|
||||
service "jahmon-agent" do
|
||||
service "mon-agent" do
|
||||
action :enable
|
||||
supports :restart => true
|
||||
end
|
||||
|
||||
# Load nagios-plugins package if it's needed
|
||||
if node[:jahmon_agent][:plugin].has_key?(:nagios_wrapper)
|
||||
if node[:mon_agent][:plugin].has_key?(:nagios_wrapper)
|
||||
["nagios-plugins"].each do |pkg|
|
||||
package pkg do
|
||||
action :install
|
||||
@ -22,24 +22,24 @@ end
|
||||
directory "/etc/dd-agent/conf.d" do
|
||||
recursive true
|
||||
action :create
|
||||
owner node['jahmon_agent']['owner']
|
||||
group node['jahmon_agent']['group']
|
||||
owner node['mon_agent']['owner']
|
||||
group node['mon_agent']['group']
|
||||
mode 0755
|
||||
end
|
||||
|
||||
# Configures the plugin yaml files based on node[:jahmon_agent][:plugin]
|
||||
# Configures the plugin yaml files based on node[:mon_agent][:plugin]
|
||||
# attributes
|
||||
node[:jahmon_agent][:plugin].each_key do |plugin|
|
||||
node[:mon_agent][:plugin].each_key do |plugin|
|
||||
template "/etc/dd-agent/conf.d/#{plugin}.yaml" do
|
||||
source "plugin_yaml.erb"
|
||||
action :create
|
||||
owner node['jahmon_agent']['owner']
|
||||
group node['jahmon_agent']['group']
|
||||
owner node['mon_agent']['owner']
|
||||
group node['mon_agent']['group']
|
||||
mode 0644
|
||||
variables(
|
||||
:init_config => node[:jahmon_agent][:plugin][plugin][:init_config],
|
||||
:instances => node[:jahmon_agent][:plugin][plugin][:instances]
|
||||
:init_config => node[:mon_agent][:plugin][plugin][:init_config],
|
||||
:instances => node[:mon_agent][:plugin][plugin][:instances]
|
||||
)
|
||||
notifies :restart, "service[jahmon-agent]"
|
||||
notifies :restart, "service[mon-agent]"
|
||||
end
|
||||
end
|
||||
|
@ -1,34 +1,34 @@
|
||||
[Main]
|
||||
send_to_datadog: <%= node['jahmon-agent']['send_to_datadog'] %>
|
||||
dd_url: <%= node['jahmon-agent']['dd_url'] %>
|
||||
api_key: <%= node['jahmon-agent']['api_key'] %>
|
||||
debug_mode: <%= node['jahmon-agent']['debug'] %>
|
||||
check_freq: <%= node['jahmon-agent']['check_freq'] %>
|
||||
send_to_datadog: <%= node['mon-agent']['send_to_datadog'] %>
|
||||
dd_url: <%= node['mon-agent']['dd_url'] %>
|
||||
api_key: <%= node['mon-agent']['api_key'] %>
|
||||
debug_mode: <%= node['mon-agent']['debug'] %>
|
||||
check_freq: <%= node['mon-agent']['check_freq'] %>
|
||||
hostname: <%= node.name %>
|
||||
use_mount: <%= node['jahmon-agent']['use_mount'] ? "yes" : "no" %>
|
||||
listen_port: <%= node['jahmon-agent']['agent_port'] %>
|
||||
use_mount: <%= node['mon-agent']['use_mount'] ? "yes" : "no" %>
|
||||
listen_port: <%= node['mon-agent']['agent_port'] %>
|
||||
tags: <%= @setting['tags']%>
|
||||
|
||||
dd_url: <%= node['jahmon-agent']['dd_url'] %>
|
||||
api_key: <%= node['jahmon-agent']['api_key'] %>
|
||||
dd_url: <%= node['mon-agent']['dd_url'] %>
|
||||
api_key: <%= node['mon-agent']['api_key'] %>
|
||||
|
||||
<% if !node['jahmon-agent']['dogstreams'].empty? -%>
|
||||
dogstreams: <%= node['jahmon-agent']['dogstreams'].join(', ') %>
|
||||
<% if !node['mon-agent']['dogstreams'].empty? -%>
|
||||
dogstreams: <%= node['mon-agent']['dogstreams'].join(', ') %>
|
||||
<% end -%>
|
||||
<% if node['jahmon-agent']['graphite'] -%>
|
||||
graphite_listen_port: <%= node['jahmon-agent']['graphite_port'] %>
|
||||
<% if node['mon-agent']['graphite'] -%>
|
||||
graphite_listen_port: <%= node['mon-agent']['graphite_port'] %>
|
||||
<% end -%>
|
||||
<% if node['jahmon-agent']['dogstatsd'] -%>
|
||||
<% if node['mon-agent']['dogstatsd'] -%>
|
||||
# ========================================================================== #
|
||||
# DogStatsd configuration #
|
||||
# ========================================================================== #
|
||||
# DogStatsd is a small server that aggregates your custom app metrics. For
|
||||
# usage information, check out http://docs.datadoghq.com
|
||||
# Make sure your client is sending to the same port.
|
||||
dogstatsd_port : <%= node['jahmon-agent']['dogstatsd_port'] %>
|
||||
dogstatsd_port : <%= node['mon-agent']['dogstatsd_port'] %>
|
||||
|
||||
## The dogstatsd flush period.
|
||||
dogstatsd_interval : <%= node['jahmon-agent']['dogstatsd_interval'] %>
|
||||
dogstatsd_interval : <%= node['mon-agent']['dogstatsd_interval'] %>
|
||||
<% end -%>
|
||||
|
||||
# ========================================================================== #
|
||||
@ -37,17 +37,17 @@ dogstatsd_interval : <%= node['jahmon-agent']['dogstatsd_interval'] %>
|
||||
|
||||
log_level: <%= @setting['log_level']%>
|
||||
|
||||
collector_log_file: /var/log/jahmon-agent/collector.log
|
||||
forwarder_log_file: /var/log/jahmon-agent/forwarder.log
|
||||
# dogstatsd_log_file: /var/log/jahmon-agent/dogstatsd.log
|
||||
collector_log_file: /var/log/mon-agent/collector.log
|
||||
forwarder_log_file: /var/log/mon-agent/forwarder.log
|
||||
# dogstatsd_log_file: /var/log/mon-agent/dogstatsd.log
|
||||
|
||||
# if syslog is enabled but a host and port are not set, a local domain socket
|
||||
# connection will be attempted
|
||||
#
|
||||
log_to_syslog: <%= node['jahmon-agent']['syslog']['active'] ? 'yes' : 'no' %>
|
||||
<% if node['jahmon-agent']['syslog']['udp'] -%>
|
||||
syslog_host: <%= node['jahmon-agent']['syslog']['host'] %>
|
||||
syslog_port: <%= node['jahmon-agent']['syslog']['port'] %>
|
||||
log_to_syslog: <%= node['mon-agent']['syslog']['active'] ? 'yes' : 'no' %>
|
||||
<% if node['mon-agent']['syslog']['udp'] -%>
|
||||
syslog_host: <%= node['mon-agent']['syslog']['host'] %>
|
||||
syslog_port: <%= node['mon-agent']['syslog']['port'] %>
|
||||
<% end -%>
|
||||
|
||||
# ========================================================================== #
|
||||
|
Loading…
x
Reference in New Issue
Block a user