Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392408 )
Change subject: icinga: convert display_name in notes_url ...................................................................... icinga: convert display_name in notes_url * Use the more suitable notes_url for storing the links to Grafana dashboards. * Temporarily leaving the display_name to avoid puppet failures, will be removed in a subsequent commit. Bug: T170353 Change-Id: Ic883d68421476296a310e5e07ed3d2a5a670c6c6 --- M modules/monitoring/manifests/check_prometheus.pp M modules/monitoring/manifests/graphite_anomaly.pp M modules/monitoring/manifests/graphite_threshold.pp M modules/monitoring/manifests/service.pp 4 files changed, 5 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/08/392408/1 diff --git a/modules/monitoring/manifests/check_prometheus.pp b/modules/monitoring/manifests/check_prometheus.pp index 70ca4e6..8039de2 100644 --- a/modules/monitoring/manifests/check_prometheus.pp +++ b/modules/monitoring/manifests/check_prometheus.pp @@ -96,12 +96,6 @@ default => 'check_prometheus', } - if $dashboard_link { - $display_name = "${description} - ${dashboard_link}" - } else { - $display_name = undef - } - monitoring::service { $title: ensure => $ensure, description => $description, @@ -110,6 +104,6 @@ group => $group, critical => $nagios_critical, contact_group => $contact_group, - display_name => $display_name, + notes_url => $dashboard_link, } } diff --git a/modules/monitoring/manifests/graphite_anomaly.pp b/modules/monitoring/manifests/graphite_anomaly.pp index e5e2f25..02a1213 100644 --- a/modules/monitoring/manifests/graphite_anomaly.pp +++ b/modules/monitoring/manifests/graphite_anomaly.pp @@ -83,12 +83,6 @@ fail("single quotes will be stripped from graphite metric ${metric}, consider using double quotes") } - if $dashboard_link { - $display_name = "${description} - ${dashboard_link}" - } else { - $display_name = undef - } - # checkcommands.cfg's check_graphite_anomaly command has # many positional arguments that # are passed to the check_graphite script: @@ -111,6 +105,6 @@ check_interval => $check_interval, retry_interval => $retry_interval, contact_group => $contact_group, - display_name => $display_name, + notes_url => $dashboard_link, } } diff --git a/modules/monitoring/manifests/graphite_threshold.pp b/modules/monitoring/manifests/graphite_threshold.pp index 5a0ddb2..aed4ff6 100644 --- a/modules/monitoring/manifests/graphite_threshold.pp +++ b/modules/monitoring/manifests/graphite_threshold.pp @@ -103,12 +103,6 @@ default => 'check_graphite_threshold' } - if $dashboard_link { - $display_name = "${description} - ${dashboard_link}" - } else { - $display_name = undef - } - monitoring::service { $title: ensure => $ensure, description => $description, @@ -121,6 +115,6 @@ check_interval => $check_interval, retry_interval => $retry_interval, contact_group => $contact_group, - display_name => $display_name, + notes_url => $dashboard_link, } } diff --git a/modules/monitoring/manifests/service.pp b/modules/monitoring/manifests/service.pp index 0cba968..f6b4c77 100644 --- a/modules/monitoring/manifests/service.pp +++ b/modules/monitoring/manifests/service.pp @@ -15,6 +15,7 @@ $event_handler = undef, $notifications_enabled = $::profile::base::notifications_enabled, $display_name = undef, + $notes_url = undef, ) { # the list of characters is the default for illegal_object_name_chars @@ -105,6 +106,7 @@ freshness_threshold => $is_fresh, event_handler => $event_handler, display_name => $display_name, + notes_url => $notes_url, }, } # This is a hack. We detect if we are running on the scope of an icinga -- To view, visit https://gerrit.wikimedia.org/r/392408 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic883d68421476296a310e5e07ed3d2a5a670c6c6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Volans <rcocci...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits