Volans has submitted this change and it was merged. ( 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/graphite/manifests/monitoring/graphite.pp 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 5 files changed, 7 insertions(+), 23 deletions(-) Approvals: jenkins-bot: Verified Volans: Looks good to me, approved diff --git a/modules/graphite/manifests/monitoring/graphite.pp b/modules/graphite/manifests/monitoring/graphite.pp index 8e96cb4..dca903b 100644 --- a/modules/graphite/manifests/monitoring/graphite.pp +++ b/modules/graphite/manifests/monitoring/graphite.pp @@ -9,7 +9,7 @@ class graphite::monitoring::graphite { monitoring::graphite_threshold { 'carbon-frontend-relay_drops': description => 'carbon-frontend-relay metric drops', - dashboard_link => 'https://grafana.wikimedia.org/dashboard/db/graphite-eqiad?orgId=1&panelId=21&fullscreen and https://grafana.wikimedia.org/dashboard/db/graphite-codfw?orgId=1&panelId=21&fullscreen', + dashboard_link => "'https://grafana.wikimedia.org/dashboard/db/graphite-eqiad?orgId=1&panelId=21&fullscreen' 'https://grafana.wikimedia.org/dashboard/db/graphite-codfw?orgId=1&panelId=21&fullscreen'", metric => 'sumSeries(transformNull(perSecond(carbon.relays.graphite*_frontend.destinations.*.dropped)))', from => '5minutes', warning => 25, @@ -20,7 +20,7 @@ monitoring::graphite_threshold { 'carbon-local-relay_drops': description => 'carbon-local-relay metric drops', - dashboard_link => 'https://grafana.wikimedia.org/dashboard/db/graphite-eqiad?orgId=1&panelId=29&fullscreen and https://grafana.wikimedia.org/dashboard/db/graphite-codfw?orgId=1&panelId=29&fullscreen', + dashboard_link => "'https://grafana.wikimedia.org/dashboard/db/graphite-eqiad?orgId=1&panelId=29&fullscreen' 'https://grafana.wikimedia.org/dashboard/db/graphite-codfw?orgId=1&panelId=29&fullscreen'", metric => 'sumSeries(transformNull(perSecond(carbon.relays.graphite*_local.destinations.*.dropped)))', from => '5minutes', warning => 25, 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: merged Gerrit-Change-Id: Ic883d68421476296a310e5e07ed3d2a5a670c6c6 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Volans <rcocci...@wikimedia.org> Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org> Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org> Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org> Gerrit-Reviewer: Volans <rcocci...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits