Add ability to configure retention policy
Create new parameters on manifest, then apply them to storage template. Change-Id: Ia8fc17bb970d28bdfa80ed19cee6b44364dfc9c0
This commit is contained in:
parent
cfa9755e5a
commit
0e3d87fbb3
|
@ -5,6 +5,23 @@ class graphite(
|
|||
$graphite_admin_user = '',
|
||||
$graphite_admin_email = '',
|
||||
$graphite_admin_password = '',
|
||||
$storage_schemas = [
|
||||
{
|
||||
'name' => 'carbon',
|
||||
'pattern' => '^carbon\.',
|
||||
'retentions' => '60:90d',
|
||||
},
|
||||
{
|
||||
'name' => 'stats',
|
||||
'pattern' => '^stats.*',
|
||||
'retentions' => '10s:8h,60s:7d,1h:1y,1d:5y',
|
||||
},
|
||||
{
|
||||
'name' => 'default',
|
||||
'pattern' => '.*',
|
||||
'retentions' => '60:90d',
|
||||
}
|
||||
],
|
||||
) {
|
||||
$packages = [ 'python-django',
|
||||
'python-django-tagging',
|
||||
|
|
|
@ -7,14 +7,9 @@
|
|||
|
||||
# Carbon's internal metrics. This entry should match what is specified in
|
||||
# CARBON_METRIC_PREFIX and CARBON_METRIC_INTERVAL settings
|
||||
[carbon]
|
||||
pattern = ^carbon\.
|
||||
retentions = 60:90d
|
||||
<% @storage_schemas.each do |schema| -%>
|
||||
["<%= schema['name'] %>"]
|
||||
pattern = <%= schema['pattern'] %>
|
||||
retentions = <%= schema['retentions'] %>
|
||||
|
||||
[stats]
|
||||
pattern = ^stats.*
|
||||
retentions = 10s:8h,60s:7d,1h:1y,1d:5y
|
||||
|
||||
[default]
|
||||
pattern = .*
|
||||
retentions = 60:90d
|
||||
<% end -%>
|
||||
|
|
Loading…
Reference in New Issue