Recommit for updates in build 59
This commit is contained in:
@@ -161,7 +161,25 @@
|
|||||||
63
|
63
|
||||||
64
|
64
|
||||||
65
|
65
|
||||||
66</pre>
|
66
|
||||||
|
67
|
||||||
|
68
|
||||||
|
69
|
||||||
|
70
|
||||||
|
71
|
||||||
|
72
|
||||||
|
73
|
||||||
|
74
|
||||||
|
75
|
||||||
|
76
|
||||||
|
77
|
||||||
|
78
|
||||||
|
79
|
||||||
|
80
|
||||||
|
81
|
||||||
|
82
|
||||||
|
83
|
||||||
|
84</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||||
@@ -219,10 +237,28 @@ class prometheus_cd::main::files (
|
|||||||
content => template('prometheus_cd/prune_blocks.erb'),
|
content => template('prometheus_cd/prune_blocks.erb'),
|
||||||
# notify Service ToDo,
|
# notify Service ToDo,
|
||||||
}
|
}
|
||||||
|
file { $ps_env_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'prometheus',
|
||||||
|
group => 'prometheus',
|
||||||
|
mode => '0750',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => usr_,
|
||||||
|
seluser => unconfined_u,
|
||||||
|
content => template('prometheus_cd/prune.env.erb'),
|
||||||
|
# notify Service ToDo,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if $ps_enable_pruning == false {
|
if $ps_enable_pruning == false {
|
||||||
file { $ps_pruning_file:
|
file { $ps_pruning_file:
|
||||||
ensure => absent,
|
ensure => absent,
|
||||||
|
# notify Service ToDo,
|
||||||
|
}
|
||||||
|
file { $ps_env_file:
|
||||||
|
ensure => absent,
|
||||||
|
# notify Service ToDo,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -625,6 +625,173 @@
|
|||||||
<em class="default">(defaults to: <tt>"${ps_pruning_dir}/prune_prometheus_pg.sh"</tt>)</em>
|
<em class="default">(defaults to: <tt>"${ps_pruning_dir}/prune_prometheus_pg.sh"</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the url and filename for the pruning script</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_env_file</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>"${ps_pruning_dir}/prune.env"</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the url and filename for the env file</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_pg_host</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'localhost'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the host running the database for cold metrics</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_pg_port</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'5432'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the port for the database for cold metrics</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_pg_db</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'prometheus'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the database for cold metrics</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_pg_user</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'readaccess'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the read-only user for the db for cold metrics</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_pg_pass</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'Changeme'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the password for the db for cold metrics</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_dry_run</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>(true = just log, false = actually delete blocks)</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_min_age_hours</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'4'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>Minimum block age in hours before pruning</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_grace_hours</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'1'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>Grace period in hours to be extra safe</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@@ -638,16 +805,6 @@
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
34
|
|
||||||
35
|
|
||||||
36
|
|
||||||
37
|
|
||||||
38
|
|
||||||
39
|
|
||||||
40
|
|
||||||
41
|
|
||||||
42
|
|
||||||
43
|
|
||||||
44
|
44
|
||||||
45
|
45
|
||||||
46
|
46
|
||||||
@@ -709,10 +866,29 @@
|
|||||||
102
|
102
|
||||||
103
|
103
|
||||||
104
|
104
|
||||||
105</pre>
|
105
|
||||||
|
106
|
||||||
|
107
|
||||||
|
108
|
||||||
|
109
|
||||||
|
110
|
||||||
|
111
|
||||||
|
112
|
||||||
|
113
|
||||||
|
114
|
||||||
|
115
|
||||||
|
116
|
||||||
|
117
|
||||||
|
118
|
||||||
|
119
|
||||||
|
120
|
||||||
|
121
|
||||||
|
122
|
||||||
|
123
|
||||||
|
124</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 34</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 44</span>
|
||||||
|
|
||||||
class prometheus_cd::params (
|
class prometheus_cd::params (
|
||||||
|
|
||||||
@@ -762,6 +938,15 @@ class prometheus_cd::params (
|
|||||||
Boolean $ps_enable_pruning = false,
|
Boolean $ps_enable_pruning = false,
|
||||||
String $ps_pruning_dir = '/opt/prometheus-prune',
|
String $ps_pruning_dir = '/opt/prometheus-prune',
|
||||||
String $ps_pruning_file = "${ps_pruning_dir}/prune_prometheus_pg.sh",
|
String $ps_pruning_file = "${ps_pruning_dir}/prune_prometheus_pg.sh",
|
||||||
|
String $ps_env_file = "${ps_pruning_dir}/prune.env",
|
||||||
|
String $ps_pg_host = 'localhost',
|
||||||
|
String $ps_pg_port = '5432',
|
||||||
|
String $ps_pg_db = 'prometheus',
|
||||||
|
String $ps_pg_user = 'readaccess',
|
||||||
|
String $ps_pg_pass = 'Changeme',
|
||||||
|
Boolean $ps_dry_run = true,
|
||||||
|
String $ps_min_age_hours = '4',
|
||||||
|
String $ps_grace_hours = '1',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# defaults
|
# defaults
|
||||||
|
|||||||
Reference in New Issue
Block a user