jenkins-bot has submitted this change and it was merged.

Change subject: integration/monitoring: Remove and redirect to Nagf instead
......................................................................


integration/monitoring: Remove and redirect to Nagf instead

Change-Id: I81a3b55d60fab161c148d50d586b0dfdaca33dec
---
A org/wikimedia/integration/.htaccess
M org/wikimedia/integration/default.html
D org/wikimedia/integration/monitoring/index.php
D org/wikimedia/integration/monitoring/monitoring.js
M shared/IntegrationPage.php
5 files changed, 4 insertions(+), 149 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/org/wikimedia/integration/.htaccess 
b/org/wikimedia/integration/.htaccess
new file mode 100644
index 0000000..0b7f04f
--- /dev/null
+++ b/org/wikimedia/integration/.htaccess
@@ -0,0 +1 @@
+Redirect 301 /monitoring/ https://tools.wmflabs.org/nagf/?project=integration
diff --git a/org/wikimedia/integration/default.html 
b/org/wikimedia/integration/default.html
index f2e7066..36f9bba 100644
--- a/org/wikimedia/integration/default.html
+++ b/org/wikimedia/integration/default.html
@@ -30,7 +30,7 @@
                </table>
        </div>
        <div class="span5">
-               <h4>Monitoring</h4>
+               <h4>Monitor</h4>
                <!--
                Tweak Ganglia graphs using parameters documentation at
                
http://sourceforge.net/apps/trac/ganglia/wiki/ganglia_modular_graph_documentation
@@ -39,7 +39,7 @@
                        <img alt="Jenkins queues last hour" 
src="https://ganglia.wikimedia.org/latest/graph.php?r=hour&amp;width=170&amp;height=50&amp;title=Jenkins+queues&amp;hreg%5B%5D=gallium&amp;mreg%5B%5D=jenkins_overallload.%2A&amp;gtype=line&amp;glegend=hide&amp;aggregate=1&amp;_=1372432670708";>
                        <img alt="Jenkins queues last day" 
src="https://ganglia.wikimedia.org/latest/graph.php?r=day&amp;width=170&amp;height=50&amp;title=Jenkins+queues&amp;hreg%5B%5D=gallium&amp;mreg%5B%5D=jenkins_overallload.%2A&amp;gtype=line&amp;glegend=hide&amp;aggregate=1&amp;_=1372432670708";>
                </a>
-               <br><a href="monitoring/">(more…)</a>
+               <br><a 
href="https://tools.wmflabs.org/nagf/?project=integration";>(more…)</a>
 
                <h4>Beta cluster</h4>
                <a 
href="https://integration.wikimedia.org/ci/view/Beta/";>Jenkins view of Beta</a>
diff --git a/org/wikimedia/integration/monitoring/index.php 
b/org/wikimedia/integration/monitoring/index.php
deleted file mode 100644
index 9ed38cb..0000000
--- a/org/wikimedia/integration/monitoring/index.php
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-require_once __DIR__ . '/../../../../shared/IntegrationPage.php';
-
-$p = IntegrationPage::newFromPageName( 'Monitoring' );
-$p->setDir( __DIR__ );
-$p->setRootDir( dirname( __DIR__ ) );
-$p->enableFooter();
-
-$hosts = array(
-       // Graphite supports wildcard target, but we want separate graphs in 
this case
-       'overview',
-       'integration-slave1001',
-       'integration-slave1002',
-       'integration-slave1003',
-       'integration-slave1006',
-       'integration-slave1007',
-       'integration-slave1008',
-       'integration-slave1009',
-       'integration-puppetmaster',
-);
-$graphConfigs = array(
-       'cpu' => array(
-               'title' => 'CPU',
-               'targets' => array(
-                       
'alias(color(stacked(HOST.cpu.total.user.value),"#3333bb"),"User")',
-                       
'alias(color(stacked(HOST.cpu.total.nice.value),"#ffea00"),"Nice")',
-                       
'alias(color(stacked(HOST.cpu.total.system.value),"#dd0000"),"System")',
-                       
'alias(color(stacked(HOST.cpu.total.iowait.value),"#ff8a60"),"Wait I/O")',
-                       
'alias(alpha(color(stacked(HOST.cpu.total.idle.value),"#e2e2f2"),0.4),"Idle")',
-               ),
-       ),
-       'memory' => array(
-               'title' => 'Memory',
-               'targets' => array(
-                       
'alias(color(stacked(HOST.memory.Inactive.value),"#5555cc"),"Inactive")',
-                       
'alias(color(stacked(HOST.memory.Cached.value),"#33cc33"),"Cached")',
-                       
'alias(color(stacked(HOST.memory.Buffers.value),"#99ff33"),"Buffers")',
-                       
'alias(alpha(color(stacked(HOST.memory.MemFree.value),"#f0ffc0"),0.4),"Free")',
-                       
'alias(color(stacked(HOST.memory.SwapCached.value),"#9900CC"),"Swap")',
-                       
'alias(color(HOST.memory.MemTotal.value,"red"),"Total")',
-               ),
-               'overview' => array(
-                       
'alias(color(stacked(sum(HOST.memory.Inactive.value)),"#5555cc"),"Inactive")',
-                       
'alias(color(stacked(sum(HOST.memory.Cached.value)),"#33cc33"),"Cached")',
-                       
'alias(color(stacked(sum(HOST.memory.Buffers.value)),"#99ff33"),"Buffers")',
-                       
'alias(alpha(color(stacked(sum(HOST.memory.MemFree.value)),"#f0ffc0"),0.4),"Free")',
-                       
'alias(color(stacked(sum(HOST.memory.SwapCached.value)),"#9900CC"),"Swap")',
-                       
'alias(color(sum(HOST.memory.MemTotal.value),"red"),"Total")',
-               ),
-       ),
-       'disk' => array(
-               'title' => 'Disk space',
-               'targets' => array(
-                       'aliasByNode(HOST.diskspace.*.byte_avail.value,-3,-2)',
-               ),
-               'overview' => array(
-                       
'alias(stacked(sum(HOST.diskspace.*.byte_avail.value)),"byte_avail")',
-               ),
-       ),
-);
-$sections = array();
-$menu = array();
-$content = '<div id="contents"></div>';
-foreach ( $hosts as $hostName ) {
-       $host = $hostName === 'overview' ? '*' : $hostName;
-       $content .= '<h3 id="h-' . htmlspecialchars( $host ) . '">' . 
htmlspecialchars( $hostName ) . '</h3>';
-       $menu[] = array( 'value' => "h-$host", 'label' => $hostName );
-       foreach ( $graphConfigs as $graphID => $graph ) {
-               $content .= '<h4 id="h-' . htmlspecialchars( "$host-$graphID" ) 
. '">' . htmlspecialchars( "$hostName: {$graph['title']}" ) . '</h4>';
-               $menu[] = array( 'value' => "h-$host-$graphID", 'label' => 
"$hostName: {$graph['title']}" );
-               $targetQuery = '';
-
-               if ( $hostName !== 'overview' ) {
-                       $targets = $graph['targets'];
-               } elseif ( isset( $graph['overview'] ) ) {
-                       $targets = $graph['overview'];
-               } else {
-                       // Default overview: sum() the source values
-                       $targets = array_map( function ( $target ) {
-                               return preg_replace( '/HOST([^\)]+)/', 
'sum(HOST$1)', $target );
-                       }, $graph['targets'] );
-               }
-
-               foreach ( $targets as $target ) {
-                       $targetQuery .= '&target=' . urlencode( str_replace( 
'HOST', "integration.$host", $target ) );
-               }
-
-               $content .= '<img width="800" height="250" 
src="//graphite.wmflabs.org/render/?'
-                       . htmlspecialchars(http_build_query(array(
-                               'title' => $graph['title'] . ' last day',
-                               'width' => 800,
-                               'height' => 250,
-                               'from' => '-24h',
-                               'hideLegend' => 'false',
-                               'uniqueLegend' => 'true',
-                       )) . $targetQuery )
-                       . '">';
-               $content .= '<br><img width="400" height="250" 
src="//graphite.wmflabs.org/render/?'
-                       . htmlspecialchars(http_build_query(array(
-                               'title' => $graph['title'] . ' last week',
-                               'width' => 400,
-                               'height' => 250,
-                               'from' => '-1week',
-                               'hideLegend' => 'false',
-                               'uniqueLegend' => 'true',
-                       )) . $targetQuery )
-                       . '">';
-               $content .= '<img width="400" height="250" 
src="//graphite.wmflabs.org/render/?'
-                       . htmlspecialchars(http_build_query(array(
-                               'title' => $graph['title'] . ' last month',
-                               'width' => 400,
-                               'height' => 250,
-                               'from' => '-1month',
-                               'hideLegend' => 'false',
-                               'uniqueLegend' => 'true',
-                       )) . $targetQuery )
-                       . '">';
-       }
-}
-
-$menuExport = json_encode( $menu );
-$content .= <<<HTML
-<script>
-var Wikimedia = {
-       monitoringMenu: $menuExport
-};
-</script>
-HTML;
-
-$p->addHtmlContent( $content );
-$p->addScript( 'monitoring.js' );
-$p->flush();
diff --git a/org/wikimedia/integration/monitoring/monitoring.js 
b/org/wikimedia/integration/monitoring/monitoring.js
deleted file mode 100644
index 2249313..0000000
--- a/org/wikimedia/integration/monitoring/monitoring.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*global Wikimedia */
-(function ($) {
-       var menu = Wikimedia.monitoringMenu,
-       select = $('<select>').on('change', function () {
-               location.hash = '#' + this.value;
-       });
-       $.each(menu, function (i, item) {
-               select.append($('<option>').val(item.value).text(item.label));
-       });
-       $('#contents').append(
-               '<p>Contents: </p>',
-               select
-       );
-}(jQuery));
diff --git a/shared/IntegrationPage.php b/shared/IntegrationPage.php
index 7f1d607..07175a3 100644
--- a/shared/IntegrationPage.php
+++ b/shared/IntegrationPage.php
@@ -9,7 +9,7 @@
 <ul class="nav">
        <li class="divider-vertical"></li>
        <li><a href="{{ROOT}}/cover/">Coverage</a></li>
-       <li><a href="{{ROOT}}/monitoring/">Monitoring</a></li>
+       <li><a 
href="https://tools.wmflabs.org/nagf/?project=integration";>Monitor</a></li>
        <li><a href="{{ROOT}}/nightly/">Nightly</a></li>
        <li><a href="{{ROOT}}/zuul/">Zuul</a></li>
        <li class="divider-vertical"></li>

-- 
To view, visit https://gerrit.wikimedia.org/r/165434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I81a3b55d60fab161c148d50d586b0dfdaca33dec
Gerrit-PatchSet: 1
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to