Created
June 14, 2012 15:25
-
-
Save jlgreer/2930962 to your computer and use it in GitHub Desktop.
DRAFT - collectd.cf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################ | |
# | |
# collectd - data collection daemon for performance monitoring | |
# | |
############################################################################ | |
bundle agent collectd(mware) { | |
vars: | |
# To do local testing on this bundle, set fileserver to localhost | |
# "fileserver" slist => { "localhost" }; | |
"fileserver" slist => { "@(var.fileserver)" }; | |
"prefix" string => "$(var.masterfiles)/dcsunix/collectd/pub"; | |
# TODO: determine whether we need all of these. Strip unneeded pkgs | |
# out of Satellite - collectd* was thrown there. | |
"collectd_pkg_x86_64_ver[rrdtool]" string => "1.3.8-6.el6"; | |
"collectd_pkg_x86_64_ver[collectd]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-apache]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-dns]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-email]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-ipmi]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-mysql]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-nginx]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-postgresql]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-rrdtool]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-sensors]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-snmp]" string => "4.10.7-1.el6"; | |
"collectd_pkg_x86_64_ver[collectd-virt]" string => "4.10.7-1.el6"; | |
"collectd_pkgs_x86_64" slist => getindices("collectd_pkg_x86_64_ver"); | |
"collectd_pkgs_i686" slist => getindices("collectd_pkg_i686_ver"); | |
# This variable doesn't get used - it's here just in order to call | |
# canonify, to convert the value of 'mware' into a class. | |
"set_middleware" string => canonify("mware"); | |
"chkconfig_on_svcs" slist => { "collectd" }; | |
methods: | |
# statsd:: | |
# | |
# "middleware" | |
# usebundle => statsd; | |
any:: | |
"chkconfig_on" | |
usebundle => chkconfig_on("$(chkconfig_on_svcs)"); | |
files: | |
# TODO: TEMPLATIZE | |
"/etc/collectd.conf" | |
copy_from => copy_std("$(prefix)/etc/collectd.conf", | |
"$(fileserver)", "false", "timestamp"), | |
classes => if_repaired("collectd_restart"), | |
perms => mode_owner_group("0644", "root", "root"), | |
# Make this chirp for now, but long-term this will likely be | |
# pervasive enough we want to silence it | |
action => actionsettings_fix_inform("inform"); | |
"/etc/collectd.d/" | |
copy_from => copy_std("$(prefix)/etc/collectd.d/", | |
"@(fileserver)", "false", "false"), | |
depth_search => searchsettings_std("inf", "false"), | |
classes => if_repaired("collectd_restart"), | |
perms => mode_owner_group("0444", "root", "root"), | |
# Make this chirp for now, but long-term this will likely be | |
# pervasive enough we want to silence it | |
action => actionsettings_fix_inform("inform"); | |
packages: | |
"$(collectd_pkgs_i686)" | |
package_policy => "add", | |
package_method => yum_rpm_exact, | |
package_version => "$(collectd_pkg_i686_ver[$(collectd_pkgs_i686)])", | |
package_architectures => { "i686" }, | |
action => actionsettings_fix_inform(inform); | |
"$(collectd_pkgs_x86_64)" | |
package_policy => "add", | |
package_method => yum_rpm_exact, | |
package_version => "$(collectd_pkg_x86_64_ver[$(collectd_pkgs_x86_64)])", | |
package_architectures => { "x86_64" }, | |
action => actionsettings_fix_inform(inform); | |
commands: | |
collectd_restart:: | |
"/etc/init.d/collectd restart" | |
contain => container_std("root", false), | |
action => actionsettings_fix_inform_noisylogs("inform"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment