Merge branch 'jenkins-build-6' into 'master'

Auto-merge for build 6

See merge request puppet/alloy_cd!2
This commit is contained in:
Jenkins
2025-06-13 14:06:44 +00:00
5 changed files with 43 additions and 9 deletions

View File

@@ -115,8 +115,7 @@
17 17
18 18
19 19
20 20</pre>
21</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/main/yumrepo.pp', line 6</span> <pre class="code"><span class="info file"># File 'manifests/main/yumrepo.pp', line 6</span>
@@ -124,7 +123,6 @@
class alloy_cd::main::yumrepo ( class alloy_cd::main::yumrepo (
) inherits alloy_cd::params { ) inherits alloy_cd::params {
# test # test
yumrepo { &#39;grafana&#39;: yumrepo { &#39;grafana&#39;:
ensure =&gt; &#39;present&#39;, ensure =&gt; &#39;present&#39;,

View File

@@ -234,6 +234,24 @@
</li> </li>
<li>
<span class='name'>ay_manage_ne</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 metric forwarding for the node exporter (external)</p>
</div>
</li>
<li> <li>
<span class='name'>ay_prom_url</span> <span class='name'>ay_prom_url</span>
@@ -281,8 +299,6 @@
<pre class="lines"> <pre class="lines">
15
16
17 17
18 18
19 19
@@ -309,10 +325,15 @@
40 40
41 41
42 42
43</pre> 43
44
45
46
47
48</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 15</span> <pre class="code"><span class="info file"># File 'manifests/params.pp', line 17</span>
class alloy_cd::params ( class alloy_cd::params (
@@ -330,6 +351,9 @@ class alloy_cd::params (
Boolean $ay_manage_prom = true, Boolean $ay_manage_prom = true,
String $ay_prom_url = &#39;https://prometheus.example.net/api/v1/write&#39;, String $ay_prom_url = &#39;https://prometheus.example.net/api/v1/write&#39;,
# node exporter (external)
Boolean $ay_manage_ne = false,
) { ) {
# service # service
$ay_service = &#39;alloy&#39; $ay_service = &#39;alloy&#39;

View File

@@ -6,7 +6,6 @@
class alloy_cd::main::yumrepo ( class alloy_cd::main::yumrepo (
) inherits alloy_cd::params { ) inherits alloy_cd::params {
# test # test
yumrepo { 'grafana': yumrepo { 'grafana':
ensure => 'present', ensure => 'present',

View File

@@ -8,6 +8,8 @@
# @param [String] ay_loki_userpass the password to logon to loki # @param [String] ay_loki_userpass the password to logon to loki
# @param [Boolean] ay_manage_loki whether to manage log forwarding to loki # @param [Boolean] ay_manage_loki whether to manage log forwarding to loki
# @param [Boolean] ay_manage_prom whether to manage metric forwarding # @param [Boolean] ay_manage_prom whether to manage metric forwarding
# @param [Boolean] ay_manage_ne whether to manage metric forwarding for
# the node exporter (external)
# @param [String] ay_prom_url the url where alloy will send metrics # @param [String] ay_prom_url the url where alloy will send metrics
# @param [Array] ay_log_targets the logging targets # @param [Array] ay_log_targets the logging targets
# @summary Class contains all parameters for the alloy_cd module. # @summary Class contains all parameters for the alloy_cd module.
@@ -28,6 +30,9 @@ class alloy_cd::params (
Boolean $ay_manage_prom = true, Boolean $ay_manage_prom = true,
String $ay_prom_url = 'https://prometheus.example.net/api/v1/write', String $ay_prom_url = 'https://prometheus.example.net/api/v1/write',
# node exporter (external)
Boolean $ay_manage_ne = false,
) { ) {
# service # service
$ay_service = 'alloy' $ay_service = 'alloy'

View File

@@ -64,7 +64,15 @@ prometheus.scrape "scrape_system" {
forward_to = [prometheus.remote_write.prometheus.receiver] forward_to = [prometheus.remote_write.prometheus.receiver]
scrape_interval = "15s" scrape_interval = "15s"
} }
<% if @ay_manage_ne == true -%>
prometheus.scrape "node_exporter" {
targets = [
{ __address__ = "localhost:9100" },)
]
forward_to = [prometheus.remote_write.prometheus.receiver]
scrape_interval = "15s"
}
<% end %>
prometheus.remote_write "prometheus" { prometheus.remote_write "prometheus" {
endpoint { endpoint {
url = "<%= @ay_prom_url %>" url = "<%= @ay_prom_url %>"