Project

General

Profile

Feature #2858

Linking Frontend monitoring from Factory monitoring

Added by Igor Sfiligoi over 8 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Factory & Frontend Monitoring
Target version:
Start date:
07/30/2012
Due date:
% Done:

0%

Estimated time:
Stakeholders:

CMS, OSG

Duration:

Description

Now that the frontend is advertising its Web URL, we should propagate this information to the Factory monitoring.


Related issues

Related to GlideinWMS - Feature #2612: Frontend should advertise its monitoring URL to factoryClosed04/02/2012

History

#1 Updated by Burt Holzman about 8 years ago

  • Assignee set to Douglas Strain

#2 Updated by Burt Holzman almost 8 years ago

  • Assignee changed from Douglas Strain to Parag Mhashilkar

#3 Updated by Parag Mhashilkar over 7 years ago

  • Target version changed from v2_7_x to v3_x

#4 Updated by Parag Mhashilkar about 7 years ago

  • Assignee changed from Parag Mhashilkar to Marco Mambelli

#5 Updated by Parag Mhashilkar almost 6 years ago

  • Stakeholders updated (diff)

#6 Updated by Parag Mhashilkar about 5 years ago

  • Target version changed from v3_x to v3_2_13

#7 Updated by Parag Mhashilkar almost 5 years ago

  • Assignee changed from Marco Mambelli to Marco Mascheroni

#8 Updated by Parag Mhashilkar almost 5 years ago

  • Target version changed from v3_2_13 to v3_2_14

#9 Updated by Parag Mhashilkar over 4 years ago

  • Target version changed from v3_2_14 to v3_2_15

#10 Updated by Parag Mhashilkar over 4 years ago

  • Target version changed from v3_2_15 to v3_2_16

#11 Updated by Parag Mhashilkar about 4 years ago

  • Assignee changed from Marco Mascheroni to HyunWoo Kim

#12 Updated by Parag Mhashilkar about 4 years ago

  • Target version changed from v3_2_16 to v3_2_17

#13 Updated by Parag Mhashilkar almost 4 years ago

  • Target version changed from v3_2_17 to v3_2_18

#14 Updated by HyunWoo Kim almost 4 years ago

I implemented my current idea of how to achieve this goal.
It can be checked in my test factory node:
http://hepcloud-devfac.fnal.gov/factory/monitor/
On the bottom right, you will find a new link.
If you follow this, you will be led to the frontend monitoring page

I need to polish this new code, i.e. I need to see if the new lines in glideFactory.py are in the best place, which might not be the case currently,
and so on..

#15 Updated by Marco Mambelli almost 4 years ago

  • Target version changed from v3_2_18 to v3_2_19

#16 Updated by HyunWoo Kim almost 4 years ago

  • Status changed from New to Assigned

#17 Updated by HyunWoo Kim over 3 years ago

Two weeks ago, I put a new code to achieve this goal.
Today, I realized that a WMS Collector usually has multiple glideclient classads from multiple frontends.
Thus, I modified my new code in glideFactory.py to extract all these frontends.

Now, I also need to modify the new HTML file that I created 2 weeks.
This is the hard part.
My intention is, have the HTML read a new text file, go over multiple lines, split each line to the frontend name and its monitoring url
and create a new link dynamically for each monitoring url/frontend pair.

I am writing a new javascript code and testing it right now..

#18 Updated by HyunWoo Kim over 3 years ago

This code seems to work
note that glideFactory.py is responsible for creating a text file(text.txt below) that contains a list of pair of frontend name and its monitoring url.

  <body>

<ul id="demo">
 <li> <a href="http://hepcloud-devfac.fnal.gov/factory/monitor/index.html" id="hklink" target="_blank"> test link </a> </li>
</ul>

    <script type="text/javascript">
      var hklist = document.getElementById('demo');

      var rawFile = new XMLHttpRequest();
      rawFile.open("GET", "./text.txt", false);
      rawFile.onreadystatechange = function ()
      {
        if(rawFile.readyState === 4)
        {
           if(rawFile.status === 200 || rawFile.status == 0)
            {
                var allText = rawFile.responseText;
                var lines = allText.split("\n");

                for(var i = 0;i < lines.length;i++){
                    var wordlist = lines[i].split(",");
                    var linksource = wordlist[1];
                    var linktext   = wordlist[0];

                    var a = document.createElement('a');
                    var linkText = document.createTextNode( linktext );
                    a.appendChild(linkText);
                    a.title = "my title text";
                    a.href = linksource;

                    var entry = document.createElement('li')
                    entry.appendChild( a );
                    hklist.appendChild(entry);
                 }
            }
        }
      }
      rawFile.send(null);

    </script>
  </body>

#19 Updated by HyunWoo Kim over 3 years ago

Today, I decided that the new logic I originally put in glideFactory.py can actually become a simple script and run via a cron.
(because this logic doesn't need to run inside the loop. it is sufficient to run it once a day)

Now, I am summarizing the new codes here:

1. factory/tools/propagate_frontend_monitoring.py (New file)
- runs condor_status command (via condorMonitor in glideinwms/lib.py) to extract the
values of WebMonitoringURL attribute in all glideclient classads
- and saves frontend_name and the monitoring url in a text file

2. accordingly a new cron script is created that goes into /var/spool/cron/ (New file)

3. creation/web_base/FrontendMonitorLink.html (New file)
- reads the text file that propagate_frontend_monitoring.py created
- and creates new links from the frontend name and monitoring url from that text file

4. creation/web_base/factory/index.html is modified to have a new box for
the new FrontendMonitorLink.html

5. glideinwms.spec file is modified to take care of the above new changes.

I will run a test rpm building in jenkins

#20 Updated by HyunWoo Kim over 3 years ago

  • Status changed from Assigned to Feedback
  • Assignee changed from HyunWoo Kim to Marco Mambelli

Today I test-built v3/2858 in jenkins which appears to be successful.
I am assigning this to Marco Mambelli for feedback.

#21 Updated by Marco Mambelli over 3 years ago

  • Assignee changed from Marco Mambelli to HyunWoo Kim

I think running once a day via cron is to few. It changes rarely but when it does you want to be responsive.
would work better in the loop.
Full feedback sent via email.
Marco

#22 Updated by HyunWoo Kim over 3 years ago

  • Status changed from Feedback to Assigned

I implemented Marco's suggestions yesterday.
I will find a time to talk with him today to make sure we are on the same page.

#23 Updated by HyunWoo Kim over 3 years ago

  • Status changed from Assigned to Resolved

Pushed to branch_v3_2
Changing to Resolved

#24 Updated by Parag Mhashilkar over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF