This repository has been archived by the owner on May 31, 2021. It is now read-only.
forked from Jonty/chef-serverdensity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
agent.cfg.erb
76 lines (64 loc) · 2.07 KB
/
agent.cfg.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# Server Density Agent Config
# See http://www.serverdensity.com/docs/agent/configvariables/
[Main]
sd_url: <%= @sd_url %>
agent_key: <%= @agent_key %>
<% if @tmp_directory %>
tmp_directory: <%= @tmp_directory %>
<% end %>
<% if @pidfile_directory %>
pidfile_directory: <%= @pidfile_directory %>
<% end %>
<% if @logging_level %>
logging_level: <%= @logging_level %>
<% end %>
# Optional status monitoring
# See http://www.serverdensity.com/docs/agent/config/
<% if @apache_status_url %>
# Apache
# See http://www.serverdensity.com/docs/agent/apache/
apache_status_url: <%= @apache_status_url %>
apache_status_user: <%= @apache_status_user %>
apache_status_pass: <%= @apache_status_pass %>
<% end %>
<% if @mongodb_server %>
# MongoDB
# See http://www.serverdensity.com/docs/agent/mongodb/
mongodb_server: <%= @mongodb_server %>
mongodb_dbstats: <%= @mongodb_dbstats ? 'yes' : 'no' %>
mongodb_replset: <%= @mongodb_replset ? 'yes' : 'no' %>
<% end %>
<% if @mysql_server %>
# MySQL
# See http://www.serverdensity.com/docs/agent/mysql/
mysql_server: <%= @mysql_server %>
mysql_user: <%= @mysql_user %>
mysql_pass: <%= @mysql_pass %>
<% end %>
<% if @nginx_status_url %>
# nginx
# See http://www.serverdensity.com/docs/agent/nginx/
nginx_status_url: <%= @nginx_status_url %>
<% end %>
<% if @rabbitmq_status_url %>
# RabbitMQ
# See http://www.serverdensity.com/docs/agent/rabbitmq/
rabbitmq_status_url: <%= @rabbitmq_status_url %>
rabbitmq_user: <%= @rabbitmq_user || 'guest' %>
rabbitmq_pass: <%= @rabbitmq_pass || 'guest' %>
<% end %>
# Plugins
# See http://www.serverdensity.com/docs/agent/writingplugins/
plugin_directory: <%= @plugin_dir %>
<% unless @plugin_options.nil? or @plugin_options.empty? %>
<% @plugin_options.reject { |k, v| v.class == Hash } .each do |name, value| %>
<%= name %> = <%= value %>
<% end %>
<% @plugin_options.select { |k, v| v.class == Hash } .each do |section, options| %>
[<%= section %>]
<% options.each do |name, value| %>
<%= name %> = <%= value %>
<% end; end; end %>
# IMPORTANT:: MY SETTINGS ARE MISSING!
# Some plugin settings may also be found in /etc/sd-agent/conf.d/