diff --git a/modules/graphite/manifests/init.pp b/modules/graphite/manifests/init.pp index 29687f154d..5ac0e5a60c 100644 --- a/modules/graphite/manifests/init.pp +++ b/modules/graphite/manifests/init.pp @@ -160,6 +160,12 @@ class graphite( require => File['/etc/graphite'], } + file { '/etc/graphite/storage-aggregation.conf': + mode => '0444', + content => template('graphite/storage-aggregation.conf.erb'), + require => File['/etc/graphite'], + } + file { '/usr/local/lib/python2.7/dist-packages/graphite/local_settings.py': mode => '0444', content => template('graphite/local_settings.py.erb'), diff --git a/modules/graphite/templates/storage-aggregation.conf.erb b/modules/graphite/templates/storage-aggregation.conf.erb new file mode 100644 index 0000000000..ab75e85e1b --- /dev/null +++ b/modules/graphite/templates/storage-aggregation.conf.erb @@ -0,0 +1,23 @@ +[min] +pattern = \.min$ +xFilesFactor = 0.1 +aggregationMethod = min + +[max] +pattern = \.max$ +xFilesFactor = 0.1 +aggregationMethod = max + +[sum] +pattern = \.count$ +xFilesFactor = 0 +aggregationMethod = sum + +[default_average] +pattern = .* +xFilesFactor = 0.3 +aggregationMethod = average + +[stats_counts] +pattern = ^stats_counts\..* +aggregationMethod = sum diff --git a/modules/graphite/templates/storage-schemas.conf.erb b/modules/graphite/templates/storage-schemas.conf.erb index d184c620d0..f0f1f6ad8b 100644 --- a/modules/graphite/templates/storage-schemas.conf.erb +++ b/modules/graphite/templates/storage-schemas.conf.erb @@ -11,6 +11,10 @@ pattern = ^carbon\. retentions = 60:90d -[default_1min_for_3years] +[default] pattern = .* -retentions = 60s:3y +retentions = 60:90d + +[stats] +pattern = ^stats.* +retentions = 10:2160,60:10080,600:262974