Compare commits

...

6 Commits

Author SHA1 Message Date
Arne Teuke
3bd4b55669 final setup 2025-06-13 17:16:08 +02:00
Arne Teuke
31fa60bd53 add option to include node exporter 2025-06-13 17:01:34 +02:00
Arne Teuke
e4746d356a add option to include node exporter 2025-06-13 16:42:52 +02:00
Arne Teuke
38f597d115 add option to include node exporter 2025-06-13 16:28:56 +02:00
Arne Teuke
7a1749a738 add option to include node exporter 2025-06-13 16:05:16 +02:00
Arne Teuke
2781df9d27 add new MR approach 2025-06-05 16:35:13 +02:00
4 changed files with 18 additions and 3 deletions

7
Jenkinsfile vendored
View File

@@ -91,7 +91,12 @@ pipeline {
git config user.name "Jenkins Server" git config user.name "Jenkins Server"
git config user.email jenkins@confdroid.com git config user.email jenkins@confdroid.com
git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit" git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit"
git push origin HEAD:master git push -o merge_request.create \
-o merge_request.target=master \
-o merge_request.title="Auto-merge for build $BUILD_NUMBER" \
-o merge_request.description="Automated changes from Jenkins build $BUILD_NUMBER" \
-o merge_request.merge_when_pipeline_succeeds=true \
origin jenkins-build-$BUILD_NUMBER
''' '''
} }
} }

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,13 @@ 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 %>"