3
0
Files
confdroid_prometheus/doc/puppet_classes/confdroid_prometheus_3A_3Aparams.html

1018 lines
21 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: confdroid_prometheus::params
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::confdroid_prometheus::params";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">confdroid_prometheus::params</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: confdroid_prometheus::params</h1>
<div class="box_info">
<dl>
<dt>Inherited by:</dt>
<dd>
<span class='object_link'><a href="confdroid_prometheus_3A_3Amain_3A_3Adirs.html" title="puppet_classes::confdroid_prometheus::main::dirs (puppet_class)">confdroid_prometheus::main::dirs</a></span><br/>
<span class='object_link'><a href="confdroid_prometheus_3A_3Amain_3A_3Afiles.html" title="puppet_classes::confdroid_prometheus::main::files (puppet_class)">confdroid_prometheus::main::files</a></span><br/>
<span class='object_link'><a href="confdroid_prometheus_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::confdroid_prometheus::main::config (puppet_class)">confdroid_prometheus::main::config</a></span><br/>
<span class='object_link'><a href="confdroid_prometheus_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::confdroid_prometheus::main::install (puppet_class)">confdroid_prometheus::main::install</a></span><br/>
<span class='object_link'><a href="confdroid_prometheus_3A_3Amain_3A_3Aservice.html" title="puppet_classes::confdroid_prometheus::main::service (puppet_class)">confdroid_prometheus::main::service</a></span><br/>
<span class='object_link'><a href="confdroid_prometheus_3A_3Amain_3A_3Ayumrepo.html" title="puppet_classes::confdroid_prometheus::main::yumrepo (puppet_class)">confdroid_prometheus::main::yumrepo</a></span><br/>
<span class='object_link'><a href="confdroid_prometheus_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_prometheus::firewall::iptables (puppet_class)">confdroid_prometheus::firewall::iptables</a></span><br/>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/params.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class holds all parameters for the confdroid_prometheus module.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>confdroid_prometheus::params.pp Module name: confdroid_prometheus Author: Arne Teuke (arne_teuke@confdroid.com)</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>reqpackage_prom</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;prometheus2&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the prometheus package</p>
</div>
</li>
<li>
<span class='name'>reqpackage_ne</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;node_exporter&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the node_exporter package</p>
</div>
</li>
<li>
<span class='name'>pkg_ensure</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;present&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>which version of the package to install</p>
</div>
</li>
<li>
<span class='name'>manage_prometheus</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>whether to manage prometheus</p>
</div>
</li>
<li>
<span class='name'>manage_node_exporter</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>whether to manage node exporter</p>
</div>
</li>
<li>
<span class='name'>ps_manage_fw</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>whether to manage the firewall</p>
</div>
</li>
<li>
<span class='name'>ps_prom_host</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;prometheus.example.net&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the fqdn of the prometheus server</p>
</div>
</li>
<li>
<span class='name'>ps_fw_prefix</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;50&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the firewall rule prefix</p>
</div>
</li>
<li>
<span class='name'>ps_main_port</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;9090&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the firewall main port for prometheus</p>
</div>
</li>
<li>
<span class='name'>ps_auth_user</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;changeme&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the username for authentication</p>
</div>
</li>
<li>
<span class='name'>ps_auth_pass</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;changeme&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the password for authentication</p>
</div>
</li>
<li>
<span class='name'>ps_web_pass</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;changeme&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the password for web authentication</p>
</div>
</li>
<li>
<span class='name'>ps_retention_time</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;15d&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>tsdb retention time</p>
</div>
</li>
<li>
<span class='name'>ps_retention_size</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;20GB&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>tsdb retention size</p>
</div>
</li>
<li>
<span class='name'>ps_wal_seg_size</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;50MB&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>WAL segment size</p>
</div>
</li>
<li>
<span class='name'>ps_min_block_dur</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;2h&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>tsdb minimum block duration</p>
</div>
</li>
<li>
<span class='name'>ps_max_block_dur</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;2h&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>tsdb maximum block duration</p>
</div>
</li>
<li>
<span class='name'>ps_max_mem</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;6G&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>hard memory ceiling</p>
</div>
</li>
<li>
<span class='name'>ps_high_mem</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;5G&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>soft limit to make kernel reclaim earlier</p>
</div>
</li>
<li>
<span class='name'>ps_swap_mem</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;4G&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>allow swap, but limit it</p>
</div>
</li>
<li>
<span class='name'>ps_oom_score</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;500&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>OOM killer choosing prometheus</p>
</div>
</li>
<li>
<span class='name'>ps_max_procs</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>reduce parallel WAL replay workers</p>
</div>
</li>
<li>
<span class='name'>ps_write_external</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>whether to allow remote postgres</p>
</div>
</li>
<li>
<span class='name'>ps_auth_ext_user</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;changeme&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>user for writing to extern instance</p>
</div>
</li>
<li>
<span class='name'>ps_auth_ext_pass</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;changeme&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>password for writing to extern instance</p>
</div>
</li>
<li>
<span class='name'>ps_external_url</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;http://changeme.local&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the full url for the remote write point</p>
</div>
</li>
<li>
<span class='name'>ps_enable_pruning</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>whether to allow pruning local blocks</p>
</div>
</li>
<li>
<span class='name'>ps_pruning_dir</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;/opt/prometheus-prune&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the directory for the pruning script</p>
</div>
</li>
<li>
<span class='name'>ps_pruning_file</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&quot;${ps_pruning_dir}/prune_prometheus_pg.sh&quot;</tt>)</em>
&mdash;
<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>&quot;${ps_pruning_dir}/prune.env&quot;</tt>)</em>
&mdash;
<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>&#39;localhost&#39;</tt>)</em>
&mdash;
<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>&#39;5432&#39;</tt>)</em>
&mdash;
<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>&#39;prometheus&#39;</tt>)</em>
&mdash;
<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>&#39;readaccess&#39;</tt>)</em>
&mdash;
<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>&#39;Changeme&#39;</tt>)</em>
&mdash;
<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>
&mdash;
<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>&#39;4&#39;</tt>)</em>
&mdash;
<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>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Grace period in hours to be extra safe</p>
</div>
</li>
<li>
<span class='name'>ps_sql_template</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;Changeme&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the SQL template to use for checks.</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 45</span>
class confdroid_prometheus::params (
# installation
String $reqpackage_prom = &#39;prometheus2&#39;,
String $reqpackage_ne = &#39;node_exporter&#39;,
String $pkg_ensure = &#39;present&#39;,
# config logic
Boolean $manage_prometheus = false,
Boolean $manage_node_exporter = false,
Boolean $ps_manage_fw = false,
String $ps_prom_host = &#39;prometheus.example.net&#39;,
# firewall
String $ps_fw_prefix = &#39;50&#39;,
String $ps_main_port = &#39;9090&#39;,
# auth prometheus
String $ps_auth_user = &#39;changeme&#39;,
String $ps_auth_pass = &#39;changeme&#39;,
String $ps_web_pass = &#39;changeme&#39;,
# auth remote
String $ps_auth_ext_user = &#39;changeme&#39;,
String $ps_auth_ext_pass = &#39;changeme&#39;,
# storage
String $ps_retention_time = &#39;15d&#39;,
String $ps_retention_size = &#39;20GB&#39;,
String $ps_wal_seg_size = &#39;50MB&#39;,
String $ps_min_block_dur = &#39;2h&#39;,
String $ps_max_block_dur = &#39;2h&#39;,
# service
String $ps_max_mem = &#39;6G&#39;,
String $ps_high_mem = &#39;5G&#39;,
String $ps_swap_mem = &#39;4G&#39;,
String $ps_oom_score = &#39;500&#39;,
String $ps_max_procs = &#39;1&#39;,
# remote write external
Boolean $ps_write_external = false,
String $ps_external_url = &#39;http://changeme.local&#39;,
# pruning script
Boolean $ps_enable_pruning = false,
String $ps_pruning_dir = &#39;/opt/prometheus-prune&#39;,
String $ps_pruning_file = &quot;${ps_pruning_dir}/prune_prometheus_pg.sh&quot;,
String $ps_env_file = &quot;${ps_pruning_dir}/prune.env&quot;,
String $ps_pg_host = &#39;localhost&#39;,
String $ps_pg_port = &#39;5432&#39;,
String $ps_pg_db = &#39;prometheus&#39;,
String $ps_pg_user = &#39;readaccess&#39;,
String $ps_pg_pass = &#39;Changeme&#39;,
Boolean $ps_dry_run = true,
String $ps_min_age_hours = &#39;4&#39;,
String $ps_grace_hours = &#39;1&#39;,
String $ps_sql_template = &#39;Changeme&#39;,
) {
# defaults
$fqdn = $facts[&#39;networking&#39;][&#39;fqdn&#39;]
$domain = $facts[&#39;networking&#39;][&#39;domain&#39;]
$os_name = $facts[&#39;os&#39;][&#39;name&#39;]
$os_release = $facts[&#39;os&#39;][&#39;release&#39;][&#39;major&#39;]
# dirs
$ps_main_dir = &#39;/etc/prometheus&#39;
$ps_system_file_dir = &#39;/etc/systemd/system/prometheus.service.d&#39;
$ps_system_dir = &#39;/etc/systemd/system/&#39;
# files
$ps_main_file = &quot;${ps_main_dir}/prometheus.yml&quot;
$ps_web_config_file = &quot;${ps_main_dir}/web.yml&quot;
$ps_system_service_file = &quot;${ps_system_file_dir}/override.conf&quot;
$ps_pruning_svc_file = &quot;${ps_system_dir}/prometheus-prune.service&quot;
$ps_pruning_timer_file = &quot;${ps_system_dir}/prometheus-prune.timer&quot;
$ps_prune_log_file = &#39;/var/log/prometheus-prune.log&#39;
# services
$ps_prom_service = &#39;prometheus&#39;
$ps_ne_service = &#39;node_exporter&#39;
$ps_prune_service = &#39;prometheus-prune.service&#39;
$ps_prune_timer = &#39;prometheus-prune.timer&#39;
# includes must be last
include confdroid_prometheus::main::config
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>