added templates for emailTxt
authorStephen Soltesz <soltesz@cs.princeton.edu>
Sat, 20 Jun 2009 00:47:14 +0000 (00:47 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Sat, 20 Jun 2009 00:47:14 +0000 (00:47 +0000)
added links in welcome page to site/node/pcus
added stub for actionsummary ; need to add links
fixed policy logic for disabled nodes
add an option to save an action record for messages that don't go through rt

monitor-server.init
monitor/bootman.py
monitor/database/info/interface.py
monitor/wrapper/emailTxt.py
nodebad.py
policy.py
web/MonitorWeb/monitorweb/controllers.py
web/MonitorWeb/monitorweb/templates/master.kid
web/MonitorWeb/monitorweb/templates/pcuview.kid
web/MonitorWeb/monitorweb/templates/welcome.kid

index 4b5bbb0..6817b6a 100644 (file)
@@ -198,6 +198,7 @@ MONITOR_HOSTNAME=${PLC_MONITOR_HOST}
 MONITOR_IP=${PLC_MONITOR_IP}
 
 PLC_WWW_HOSTNAME=${PLC_WWW_HOST}
+PLC_NAME=${PLC_NAME}
 
 # used for debug mode
 email=
index 9fe28af..f64fb00 100755 (executable)
@@ -659,7 +659,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
        if fbnode['observed_category'] == "OLDBOOTCD":
                print "\t...Notify owner to update BootImage!!!"
 
-               if not found_within(recent_actions, 'newbootcd_notice', 3):
+               if not found_within(recent_actions, 'newbootcd_notice', 3.5):
                        sitehist.sendMessage('newbootcd_notice', hostname=hostname)
 
                        print "\tDisabling %s due to out-of-date BootImage" % hostname
@@ -701,7 +701,8 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                        print "...Should investigate.  Skipping node."
                        # TODO: send message related to these errors.
 
-                       if not found_within(recent_actions, 'baddisk_notice', 3):
+                       if not found_within(recent_actions, 'baddisk_notice', 7):
+                               print "baddisk_notice not found recently"
 
                                log=conn.get_dmesg().read()
                                sitehist.sendMessage('baddisk_notice', hostname=hostname, log=log)
@@ -742,6 +743,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                args['sequence'] = s
                args['bmlog'] = conn.get_bootmanager_log().read()
                args['viart'] = False
+               args['saveact'] = True
 
                sitehist.sendMessage('unknownsequence_notice', **args)
 
@@ -780,6 +782,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                        args['sequence'] = s
                        args['bmlog'] = conn.get_bootmanager_log().read()
                        args['viart'] = False
+                       args['saveact'] = True
 
                        sitehist.sendMessage('unknownsequence_notice', **args)
                        conn.restart_bootmanager('boot')
@@ -787,7 +790,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                # TODO: differentiate this and the 'nodenetwork_email' actions.
                elif sequences[s] == "update_node_config_email":
 
-                       if not found_within(recent_actions, 'nodeconfig_notice', 3):
+                       if not found_within(recent_actions, 'nodeconfig_notice', 3.5):
                                args = {}
                                args['hostname'] = hostname
                                sitehist.sendMessage('nodeconfig_notice', **args)
@@ -795,7 +798,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
 
                elif sequences[s] == "nodenetwork_email":
 
-                       if not found_within(recent_actions, 'nodeconfig_notice', 3):
+                       if not found_within(recent_actions, 'nodeconfig_notice', 3.5):
                                args = {}
                                args['hostname'] = hostname
                                args['bmlog'] = conn.get_bootmanager_log().read()
@@ -804,7 +807,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
 
                elif sequences[s] == "update_bootcd_email":
 
-                       if not found_within(recent_actions, 'newalphacd_notice', 3):
+                       if not found_within(recent_actions, 'newalphacd_notice', 3.5):
                                args = {}
                                args.update(getconf.getconf(hostname)) # NOTE: Generates boot images for the user:
                                args['hostname'] = hostname
@@ -818,7 +821,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                        # require either an exception "/minhw" or other manual intervention.
                        # Definitely need to send out some more EMAIL.
                        # TODO: email notice of broken hardware
-                       if not found_within(recent_actions, 'baddisk_notice', 1):
+                       if not found_within(recent_actions, 'baddisk_notice', 7):
                                print "...NOTIFYING OWNERS OF BROKEN HARDWARE on %s!!!" % hostname
                                args = {}
                                args['hostname'] = hostname
@@ -828,7 +831,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                                conn.set_nodestate('disabled')
 
                elif sequences[s] == "update_hardware_email":
-                       if not found_within(recent_actions, 'minimalhardware_notice', 1):
+                       if not found_within(recent_actions, 'minimalhardware_notice', 7):
                                print "...NOTIFYING OWNERS OF MINIMAL HARDWARE FAILURE on %s!!!" % hostname
                                args = {}
                                args['hostname'] = hostname
index 0692ede..e9a08a6 100644 (file)
@@ -111,7 +111,12 @@ class SiteInterface(HistorySiteRecord):
                # TODO: catch any errors here, and add an ActionRecord that contains
                #       those errors.
                
-               args = {'loginbase' : self.db.loginbase, 'penalty_level' : self.db.penalty_level}
+               args = {'loginbase' : self.db.loginbase, 
+                               'penalty_level' : self.db.penalty_level,
+                               'monitor_hostname' : config.MONITOR_HOSTNAME,
+                               'support_email'   : config.support_email,
+                               'plc_name' : config.PLC_NAME,
+                               'plc_hostname' : config.PLC_WWW_HOSTNAME}
                args.update(kwargs)
 
                hostname = None
@@ -121,10 +126,16 @@ class SiteInterface(HistorySiteRecord):
                if hasattr(mailtxt, type):
 
                        message = getattr(mailtxt, type)
+
+                       saveact = True
                        viart = True
-                       if 'viart' in kwargs:
+                       if 'viart' in kwargs: 
+                               saveact = kwargs['viart']
                                viart = kwargs['viart']
 
+                       if 'saveact' in kwargs: 
+                               saveact = kwargs['saveact']
+
                        if viart:
                                self.getTicketStatus()          # get current message status
                                if self.db.message_status not in ['open', 'new']:
@@ -133,6 +144,7 @@ class SiteInterface(HistorySiteRecord):
                        m = Message(message[0] % args, message[1] % args, viart, self.db.message_id)
 
                        contacts = self.getContacts()
+                       #contacts = [config.cc_email]
 
                        print "sending message: %s to site %s for host %s" % (type, self.db.loginbase, hostname)
 
@@ -142,6 +154,7 @@ class SiteInterface(HistorySiteRecord):
                                # reset to previous status, since a new subject 'opens' RT tickets.
                                self.setTicketStatus(self.db.message_status) 
 
+                       if saveact:
                                # NOTE: only make a record of it if it's in RT.
                                act = ActionRecord(loginbase=self.db.loginbase, hostname=hostname, action='notice', 
                                                                action_type=type, message_id=self.db.message_id)
@@ -154,12 +167,12 @@ class SiteInterface(HistorySiteRecord):
                return
 
        def closeTicket(self):
-               # TODO: close the rt ticket before overwriting the message_id
-               mailer.closeTicketViaRT(self.db.message_id, "Ticket Closed by Monitor")
-               act = ActionRecord(loginbase=self.db.loginbase, action='notice', 
-                                                       action_type='close_ticket', message_id=self.db.message_id)
-               self.db.message_id = 0
-               self.db.message_status = "new"
+               if self.db.message_id:
+                       mailer.closeTicketViaRT(self.db.message_id, "Ticket Closed by Monitor")
+                       act = ActionRecord(loginbase=self.db.loginbase, action='notice', 
+                                                               action_type='close_ticket', message_id=self.db.message_id)
+                       self.db.message_id = 0
+                       self.db.message_status = "new"
 
        def runBootManager(self, hostname):
                from monitor import bootman
index 9b7b456..b1da5f8 100644 (file)
 
 class mailtxt:
 
-       newdown_one=("""PlanetLab node(s) down: %(loginbase)s""", 
-"""
-Hello,
-
-As part of PlanetLab node monitoring, we noticed the following nodes were down at your site:
-
-%(hostname_list)s 
-We're writing because we need your help returning them to their regular operation.
-
-To help, please confirm that a verison 3.0 or greater BootCD is installed in the machine.  Then, after checking that the node is properly networked, power cycle the machine.  Note that rebooting the machine may not fully resolve the problems we are seeing.  Once the machine has come back up, please visit the Comon status page to verify that your node is accessible from the network.  It may take several minutes before Comon registers your node.  Until that time, visiting the link below will return the message 'could not find requested table - probably empty'.
-
-       http://summer.cs.princeton.edu/status/tabulator.cgi?table=nodes/table_%(hostname)s&limit=50
-
-If the machine has booted successfully, you may check it more quickly by logging in with your site_admin account, and running:
-
-    sudo /usr/sbin/vps ax
-
-If you have a BootCD older than 3.0, you will need to create a new BootImage on CD or USB.  You can find instructions for this at the Technical Contact's Guide:
-
-    https://www.planet-lab.org/doc/guides/bootcdsetup
-
-If after following these directions, and either logging in with your site_admin account or seeing the CoMon report of your machine, there is no need to respond to this message.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue.   Including this message in your reply will help us coordinate our records with the actions you've taken.
-
-Finally, you can track the current status of your machines using this Google Gadget:
-
-    http://fusion.google.com/add?source=atgs&moduleurl=http://monitor.planet-lab.org/monitor/sitemonitor.xml
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-#If no one responds, then after a week, we will disable your site's ability to create new slices.  Because this action will directly affect your site's registered PI, we will also CC the PI for help at that time.
-
-       newdown_two=("""PlanetLab node(s) down: %(loginbase)s""", 
-"""
-Hello,
-
-As part of PlanetLab node monitoring, we noticed the following nodes were down at your site:
-
-%(hostname_list)s 
-We're writing again because our previous correspondence, sent only to the registered Technical Contact, has gone unacknowledged for at least a week, and we need your help returning these machines to their regular operation.  We understand that machine maintenance can take time.  So, while we wait for the machines to return to their regular operation slice creation has been suspended at your site.  No new slices may be created, but the existing slices and services running within them will be unaffected.
-
-To help, please confirm that a verison 3.0 or greater BootCD is installed in the machine.  Then, after checking that the node is properly networked, power cycle the machine.  Note that rebooting the machine may not fully resolve the problems we are seeing.  Once the machine has come back up, please visit the Comon status page to verify that your node is accessible from the network.  It may take several minutes before Comon registers your node.  Until that time, visiting the link below will return the message 'could not find requested table - probably empty'.
-
-       http://summer.cs.princeton.edu/status/tabulator.cgi?table=nodes/table_%(hostname)s&limit=50
-
-If the machine has booted successfully, you may check it more quickly by logging in with your site_admin account, and running:
-
-    sudo /usr/sbin/vps ax
-
-If you have a BootCD older than 3.0, you will need to create a new Boot CD and configuration file.  You can find instructions for this at the Technical Contact's Guide:
-
-    https://www.planet-lab.org/doc/guides/bootcdsetup
-
-If after following these directions, and either logging in with your site_admin account or seeing the CoMon report of your machine, there is no need to respond to this message.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue.   Including this message in your reply will help us coordinate our records with the actions you've taken.
-
-Finally, you can track the current status of your machines using this Google Gadget:
-
-    http://fusion.google.com/add?source=atgs&moduleurl=http://monitor.planet-lab.org/monitor/sitemonitor.xml
-
-After another week, we will disable all slices currently running on PlanetLab.  Because this action will directly affect all users of these slices, these users will also be notified at that time.
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-       newdown_three=("""PlanetLab node(s) down: %(loginbase)s""", 
-"""
-Hello,
-
-As part of PlanetLab node monitoring, we noticed the following nodes were down at your site:
-
-%(hostname_list)s 
-We understand that machine maintenance can take time.  We're writing again because our previous correspondences, sent first to the registered Technical Contact then the the Site PI, have gone unacknowledged for at least two weeks, and we need your help returning these machines to their regular operation.  This is the third time attempting to contact someone in regard to these machines at your site.  So, while we wait for the machines to return to their regular operation all current slice activity will be suspended.  Current experiments will be stopped and will not be be able to start again until there is evidence that you have begun to help with the maintenance of these machines.
-
-To help, please confirm that a verison 3.0 or greater BootCD is installed in the machine.  Then, after checking that the node is properly networked, power cycle the machine.  Note that rebooting the machine may not fully resolve the problems we are seeing.  Once the machine has come back up, please visit the Comon status page to verify that your node is accessible from the network.  It may take several minutes before Comon registers your node.  Until that time, visiting the link below will return the message 'could not find requested table - probably empty'.
-
-       http://summer.cs.princeton.edu/status/tabulator.cgi?table=nodes/table_%(hostname)s&limit=50
-
-If the machine has booted successfully, you may check it more quickly by logging in with your site_admin account, and running:
-
-    sudo /usr/sbin/vps ax
-
-If you have a BootCD older than 3.0, you will need to create a new Boot CD and configuration file.  You can find instructions for this at the Technical Contact's Guide:
-
-    https://www.planet-lab.org/doc/guides/bootcdsetup
-
-Finally, you can track the current status of your machines using this Google Gadget:
-
-    http://fusion.google.com/add?source=atgs&moduleurl=http://monitor.planet-lab.org/monitor/sitemonitor.xml
-
-If after following these directions, and either logging in with your site_admin account or seeing the CoMon report of your machine, there is no need to respond to this message.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue.   Including this message in your reply will help us coordinate our records with the actions you've taken.
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-       newbootcd_one=(""" Planetlab nodes need a new BootCD: %(loginbase)s""", # : %(hostname)s""", 
-"""As part of PlanetLab node monitoring, we noticed the following nodes have an out-dated BootCD: 
-
-%(hostname_list)s  
-This usually implies that you need to update the BootCD and node configuration file stored on the read-only media (either the all-in-one ISO CD, floppy disk, or write-protected USB stick).
-
-To check the status of these and any other machines that you manage please visit:
-
-    http://comon.cs.princeton.edu/status
-
-Instructions to perform the steps necessary for a BootCD upgrade are available in the Technical Contact's Guide.
-
-    https://www.planet-lab.org/doc/guides/bootcdsetup
-
-If your node returns to normal operation after following these directions, then there's no need to respond to this message.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue.  Including this message in your reply will help us coordinate our records with the actions you've taken.  
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-#After a week, we will disable your site's ability to create new slices.  Because this action will directly affect your site's registered PI, we will also CC the PI for help at that time.
-
-       newbootcd_two=(""" Planetlab nodes need a new BootCD: %(loginbase)s""", # : %(hostname)s""", 
-"""As part of PlanetLab node monitoring, we noticed the following nodes have an out-dated BootCD: 
-
-%(hostname_list)s  
-This usually implies that you need to update the BootCD and node configuration file stored on the read-only media (Either the all-in-one ISO CD, floppy disk, or write-protected USB stick).
-
-We're writing again because our previous correspondence, sent only to the registered Technical Contact, has gone unacknowledged for at least a week, and we need your help returning these machines to their regular operation.  We understand that machine maintenance can take time.  So, while we wait for the machines to return to their regular operation, slice creation has been suspended at your site.  No new slices may be created, but the existing slices and services running within them will be unaffected.
-
-To check the status of these and any other machines that you manage please visit:
-
-    http://comon.cs.princeton.edu/status
-
-Instructions to perform the steps necessary for a BootCD upgrade are available in the Technical Contact's Guide.
-
-    https://www.planet-lab.org/doc/guides/bootcdsetup
-
-If your node returns to normal operation after following these directions, then there's no need to respond to this message.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue.  Including this message in your reply will help us coordinate our records with the actions you've taken.  
-
-After another week, we will disable all slices currently running on PlanetLab.  Because this action will directly affect all users of these slices, these users will also be notified at that time.
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-       newbootcd_three=(""" Planetlab nodes need a new BootCD: %(loginbase)s""", # : %(hostname)s""", 
-"""As part of PlanetLab node monitoring, we noticed the following nodes have an out-dated BootCD: 
-
-%(hostname_list)s  
-This usually implies that you need to update the BootCD and node configuration file stored on the read-only media (Either the all-in-one ISO CD, floppy disk, or write-protected USB stick).
-
-We understand that machine maintenance can take time.  We're writing again because our previous correspondences, sent first to the registered Technical Contact then the the Site PI, have gone unacknowledged for at least two weeks, and we need your help returning these machines to their regular operation.  This is the third time attempting to contact someone in regard to these machines at your site.  So, while we wait for the machines to return to their regular operation all current slice activity will be suspended.  Current experiments will be stopped and will not be be able to start again until there is evidence that you have begun to help with the maintenance of these machines.
-
-To check the status of these and any other machines that you manage please visit:
-
-    http://comon.cs.princeton.edu/status
-
-Instructions to perform the steps necessary for a BootCD upgrade are available in the Technical Contact's Guide.
-
-    https://www.planet-lab.org/doc/guides/bootcdsetup
-
-If your node returns to normal operation after following these directions, then there's no need to respond to this message.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue.  Including this message in your reply will help us coordinate our records with the actions you've taken.  
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-       pcuthankyou_one=("""Thank you for correcting your PlanetLab node PCU - %(loginbase)s""",
-       """
-While monitoring your site, we noticed that the following PCU *improved* their states:
-
-%(hostname_list)s  
-Often, system administration is a thankless job, but not today. :-)
-
-Thank you!
-  -- PlanetLab Central (support@planet-lab.org)
-       """)
-
        thankyou=("""Thank you for helping maintain your PlanetLab nodes - %(loginbase)s""",
        """
 While monitoring your site, we noticed that the following nodes *improved*
@@ -195,7 +22,7 @@ their states:
 Often, system administration is a thankless job, but not today. :-)
 
 Thank you!
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 
 Legend:
 PROD-      This state is the production state where the node can contact PlanetLab, 
@@ -219,14 +46,14 @@ By taking a few moments now to register your PCU for this host, you will save
 time in the future the next time we need to reboot this machine, because we
 will be able to do so without disturbing you.
 
-    http://www.planet-lab.org/registerwizard/index.php
+    http://%(plc_hostname)s/registerwizard/index.php
 
 The registration is very quick.  All we need are: PCU hostname, IP, username, 
 and password.  Then, choose which node to associate it with, and we will take 
 care of the rest.
 
 Thank you very much for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 """)
 
        pcufailed_notice =("""Could not use PCU to reboot %(hostname)s""",
@@ -235,7 +62,7 @@ Thank you very much for your help,
 the host did not come back online.  You may be able to learn more by visiting
 this link:
 
-    https://monitor.planet-lab.org/monitor/pcuview?loginbase=%(loginbase)s
+    https://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
 
 We need your help resolving this issue in a few ways:  
 
@@ -253,16 +80,16 @@ We need your help resolving this issue in a few ways:
  3. If there is nothing apparently wrong with the PCU, or the mapping between
     the PCU and the host, then there is likely a problem with our bootstrap
     software on your machine.  To help us, please make a note of any text on
-    the console and report it to mailto:support@planet-lab.org .  An example
+    the console and report it to mailto:%(support_email)s .  An example
     might be that the console hangs waiting for a module to unload.  The last
     reported name or any error messages on the screen would be very helpful.
 
 If the PCU is up and running, but behind a firewall, please make it accessible
 from address block 128.112.139.0/24.  You can confirm that this is the address
-space from which the PlanetLab Central servers run.
+space from which the %(plc_name)s servers run.
 
 Thank you very much for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 """)
 
        online_notice=("""Host %(hostname)s is online""",
@@ -272,10 +99,10 @@ This notice is simply to let you know that:
 
 is online and operational.  
 
-       http://monitor.planet-lab.org/monitor/pcuview?loginbase=%(loginbase)s
+    http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
 
 Thank you very much for your help!
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
        """)
        test_notice=("""Host %(hostname)s is testing""",
        """
@@ -303,10 +130,10 @@ Please investigate, and let us know if there's anything we can do to help get
 it back on-line.  You can see more information about the current status of
 this host here:
 
-       http://monitor.planet-lab.org/monitor/pcuview?loginbase=%(loginbase)s
+    http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
 
 Thank you very much for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
        """)
 
        clear_penalty=("""All privileges restored to site %(loginbase)s""",
@@ -318,10 +145,10 @@ All privileges are restored.  You may create slices again, and if your
 slices were disabled, please allow up to 30 minutes for them to return to 
 enabled.
 
-       http://monitor.planet-lab.org/monitor/pcuview?loginbase=%(loginbase)s
+    http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
 
 Thank you very much for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 
 Legend:
 
@@ -339,10 +166,10 @@ Your privileges will be reduced corresponding to the legend below.  To
 restore these privileges, please return at least two machines to working 
 state.
 
-       http://monitor.planet-lab.org/monitor/pcuview?loginbase=%(loginbase)s
+    http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
 
 Thank you very much for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
   
 Legend:
 
@@ -363,95 +190,12 @@ CD, floppy disk, or write-protected USB stick).
 You can do this by walking through the steps of the registration wizard, and
 downloading a new BootImage for your machine.
 
-    https://www.planet-lab.org/registerwizard/index.php
+    https://%(plc_hostname)s/registerwizard/index.php
 
 Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 """)
 
-#############################################################################
-#############################################################################
-#############################################################################
-
-       pcudown_one =("""Could not use PCU to reboot %(hostname)s""",
-
-"""As part of PlanetLab node monitoring and maintenance, we tried to use the PCU
-registered below, but could not for the reasons at the link below:
-
-       https://monitor.planet-lab.org/cgi-bin/printbadpcus.php?id=%(pcu_id)s
-
-We need your help resolving this issue in a few ways:  
-
- 1. First, we need your help rebooting %(hostname)s.  Because the above PCU does 
-    not appear to work, please manually reboot this machine.  If it turns out that 
-    there is a problem with the PCU configuration, we can help you
-    resolve that independently.
-
- 2. If there is nothing apparently wrong with the PCU, or the mapping between
-    the PCU and the host, then there is likely a problem with our bootstrap
-    software on your machine.  To help us, please make a note of any text on
-    the console and report it to mailto:support@planet-lab.org .  An example
-    might be that the console hangs waiting for a module to unload.  The last
-    reported name or any error messages on the screen would be very helpful.
-
- 3. Alternately, if it is possible, please correcct the above PCU problem, or
-    let us know what steps you are taking.  By enabling us to take administrative 
-    actions automatically from PlanetLab Central without your intervention, you 
-    can trade a small amount of time now for a time savings in the future. 
-
-If the PCU is up and running, but behind a firewall, please make it accessible
-from address block 128.112.139.0/24.  You can confirm that this is the address
-space from which the PlanetLab Central servers run.
-
-If the above PCU is no longer in service, please delete it by visiting:
-
-    https://www.planet-lab.org/db/sites/pcu.php?id=%(pcu_id)s
-
-and selecting 'Delete PCU'. You may then register a new PCU for your nodes.
-
-Thank you very much for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-       pcutonodemapping_one =("""PCU to Node mapping is incorrect for %(hostname)s""",
-       """
-    As part of our machine monitoring and maintenance, we tried to use the PCU
-registered below, and though it appears to succeed, we do not subsequently
-observe the associated nodes rebooting:
-
-    https://monitor.planet-lab.org/cgi-bin/printbadpcus.php?id=%(pcu_id)s
-
-%(hostname_list)s
-
-We need your help resolving this issue in two ways:  
-
-* First, we need your help rebooting %(hostname)s.  Because the above PCU 
-  does not appear to actually control the above Nodes, we cannot use it to
-  reboot these machines. So, please manually reboot the machine and we can 
-  help you resolve any configuration errors with the PCU independently.
-
-* Second, please check the configuration of the above PCU.  Check that the 
-  PCU is physically connected to the servers that it should be able to
-  control.  A common mistake is that the PCU is registered for a machine, 
-  but not actually connected physically to the machine. 
-
-By enabling us to take administrative actions automatically from PlanetLab
-Central without local intervention, you can trade a small amount of time now
-for a time savings in the future. 
-    
-If the above PCU is no longer in service, please delete it by visiting:
-
-    https://www.planet-lab.org/db/sites/pcu.php?id=%(pcu_id)s
-
-and selecting 'Delete PCU'. You may then register a new PCU for your nodes.
-
-Alternately, if the machines listed above are no longer in service, please
-delete them by visiting your sites page at:
-
-    https://www.planet-lab.org/
-
-Thank you very much for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
 
        newalphacd_notice=("""New Boot Images for %(hostname)s""", 
 """As part of PlanetLab node monitoring, we noticed that we were not able to recognize all the hardware in your machine.  This means that it is so new that it needs a new BootCD, or that it is so old that it is no longer supported.
@@ -466,28 +210,29 @@ The only step that you need to take is to choose which media you prefer, either
 
 Instructions to burn or copy these All-in-One images to the appropriate media are available in the Technical Contact's Guide.
 
-    https://www.planet-lab.org/doc/guides/bootcdsetup
+    https://%(plc_hostname)s/doc/guides/bootcdsetup
 
-If your node returns to normal operation after following these directions, then there's no need to respond to this message.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue.  Including this message in your reply will help us coordinate our records with the actions you've taken.  
+If your node returns to normal operation after following these directions, then there's no need to respond to this message.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (%(support_email)s) so we can help resolve the issue.  Including this message in your reply will help us coordinate our records with the actions you've taken.  
 
 Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 """)
 
+
        # TODO: need reminder versions for repeats...
-       newdown=[newdown_one, newdown_two, newdown_three]
-       newbootcd=[newbootcd_one, newbootcd_two, newbootcd_three]
+       #newdown=[newdown_one, newdown_two, newdown_three]
+       #newbootcd=[newbootcd_one, newbootcd_two, newbootcd_three]
        #newalphacd=[newalphacd_one, newalphacd_one, newalphacd_one]
-       newthankyou=[thankyou,thankyou,thankyou]
-       pcuthankyou=[pcuthankyou_one,pcuthankyou_one,pcuthankyou_one]
-       pcutonodemapping=[pcutonodemapping_one, pcutonodemapping_one, pcutonodemapping_one]
-       pcudown=[pcudown_one, pcudown_one, pcudown_one]
+       #newthankyou=[thankyou,thankyou,thankyou]
+       #pcuthankyou=[pcuthankyou_one,pcuthankyou_one,pcuthankyou_one]
+       #pcutonodemapping=[pcutonodemapping_one, pcutonodemapping_one, pcutonodemapping_one]
+       #pcudown=[pcudown_one, pcudown_one, pcudown_one]
 
        unknownsequence_notice = ("""Unrecognized Error on PlanetLab host %(hostname)s""", 
                                           """
 While trying to automatically recover this machine:
 
-    http://www.planet-lab.org/db/nodes/index.php?pattern=%(hostname)s
+    http://%(plc_hostname)s/db/nodes/index.php?pattern=%(hostname)s
 
 We encountered an unknown situation.  Please re-code to handle, or manually intervene to repair this host.
 
@@ -499,87 +244,19 @@ BootManager.log output follows:
 ---------------------------------------------------------
 %(bmlog)s
 """      )
-       donation_down_one=("""PlanetLab node donation setup: %(hostname)s""", 
-       """
-Hello,
-
-As part of PlanetLab node monitoring, we noticed the following node is registered in the PlanetLab database, but it is not completly setup and running.
-
-%(hostname_list)s 
-We are writing because we need your help completing the setup to ensure its full operation.
-
-You should have received directions for the complete configuration when you contacted the donation program coordinator at PlanetLab.  For review, or if you did not receive them, you can find the latest version here:
-
-    https://svn.planet-lab.org/wiki/DC7800Configuration
-
-It is essential that the AMT feature be configured to enable PlanetLab staff to remotely manage the machine.  The basic steps are:
-
-    Configure the DC7800 AMT feature  : https://www.planet-lab.org/AMT
-    Add a PCU to your site            : https://www.planet-lab.org/db/sites/pcu.php
-       Associate your node with the PCU  : Follow the 'My Site' link
-       Finally, download the Boot Image  : https://www.planet-lab.org/db/nodes/index.php?pattern=%(hostname)s
-       Burn Boot Image to media & Reboot your node
-
-You can confirm that your machine's PCU is correctly configured by visiting the AMT
-port using your browser, such as:
-
-    http://%(hostname)s:16992/
-
-If you need any clarification about the steps mentioned here, please feel free
-to contact us at PlanetLab Support (support@planet-lab.org).
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-       donation_nopcu_one=("""PlanetLab node donation, PCU setup: %(hostname)s""", 
-"""
-Hello,
-
-As part of PlanetLab node monitoring, we noticed the following node was not completely setup at your site:
-
-%(hostname_list)s 
-We are writing because we need your help completing the setup to ensure its full operation.
-
-The DC7800 comes with a built-in remote management feature.  The PCU functionality on your node is not configured.  The result of this is that we are unable to remotely administer this machine.
-
-You should have received directions for the complete configuration when you contacted the donation program coordinator at PlanetLab.  For review, or if you did not receive them, you can find the latest version here:
-
-    https://svn.planet-lab.org/wiki/DC7800Configuration
-
-It is essential that the PCU be configured.  The basic steps are:
-
-    Configure the DC7800 AMT feature  : https://www.planet-lab.org/AMT
-    Add a PCU to your site            : https://www.planet-lab.org/db/sites/pcu.php
-       Associate your node with the PCU  : Follow the 'My Site' link
-
-You can confirm that your machine is correctly configured by visiting the AMT
-port using your browser, such as:
-
-    http://%(hostname)s:16992/
-
-If you need any clarification about the steps mentioned here, please feel free
-to contact us at PlanetLab Support (support@planet-lab.org).
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-       donation_nopcu = [ donation_nopcu_one, donation_nopcu_one, donation_nopcu_one ]
-       donation_down = [ donation_down_one, donation_down_one, donation_down_one ]
 
 
        minimalhardware_notice = ("""Hardware requirements not met on PlanetLab host %(hostname)s""", 
                                           """
 While trying to automatically recover this machine:
 
-    http://www.planet-lab.org/db/nodes/index.php?pattern=%(hostname)s
+    http://%(plc_hostname)s/db/nodes/index.php?pattern=%(hostname)s
 
 We encountered an failed hardware requirement.  Please look at the log below to determine the exact nature of the failure, either Disk, CPU, Network, or Mimial RAM was not satisfied.
 
-If your machine does not meet the current hardware specifications for a PlanetLab node (http://www.planet-lab.org/hardware), please upgrade it to meet the current recommended configuration.  
+If your machine does not meet the current hardware specifications for a PlanetLab node (http://%(plc_hostname)s/hardware), please upgrade it to meet the current recommended configuration.  
 
-If you believe this message is an error, please email support@planet-lab.org explaining the problem.  You may need to create an updated Boot Image that includes drivers for your hardware.
+If you believe this message is an error, please email %(support_email)s explaining the problem.  You may need to create an updated Boot Image that includes drivers for your hardware.
 
 Thank you,
  - PlanetLab Support
@@ -592,11 +269,11 @@ BootManager.log output follows:
        baddisk_notice = ("""Bad Disk on PlanetLab node %(hostname)s""", 
                           """As part of PlanetLab node monitoring, we noticed %(hostname)s has a number of disk or media related I/O errors, that prevent it from either booting or reliably running as a PlanetLab node.
 
-Please verify the integrity of the disk, and order a replacement if needed.  If you need to schedule downtime for the node, please let us know at support@planet-lab.org
+Please verify the integrity of the disk, and order a replacement if needed.  If you need to schedule downtime for the node, please let us know at %(support_email)s
 
 Thanks.
 
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 
 The output of `dmesg` follows:
 -------------------------------------------------------------------------
@@ -604,97 +281,20 @@ The output of `dmesg` follows:
 %(log)s
 """)
 
-       down=("""PlanetLab node %(hostname)s down.""", """As part of PlanetLab node monitoring, we noticed %(hostname)s has been down for %(days)s days.
-
-Please check the node's connectivity and, if properly networked, power cycle the machine. Note that rebooting the machine may not fully resolve the problems we're seeing. Once the machine has come back up, please visit the Comon status page to verify that your node is accessible from the network.
-
-http://summer.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&select='address==%(hostbyteorder)s'
-
-http://www.planet-lab.org/db/sites/index.php?id=%(site_id)d
-
-There's no need to respond to this message if CoMon reports that your machine is accessible. However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can resolve the issue. 
-
-Thanks.
-
-
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-       dbg=("""Planetlab node %(hostname)s requires reboot.""", """As part of PlanetLab node monitoring, we noticed %(hostname)s is in debug mode.  This usually implies the node was rebooted unexpectedly and could not come up cleanly.  
-
-Please check the node's connectivity and, if properly networked, power cycle the machine. Note that rebooting the machine may not fully resolve the problems we're seeing. Once the machine has come back up, please visit the Comon status page to verify that your node is accessible from the network.
-
-http://summer.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&select='address==%(hostbyteorder)s'
-
-There's no need to respond to this message if CoMon reports that your machine is accessible. However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can resolve the issue. 
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-       plnode_cfg=(""" Please Verify Network Configuration for PlanetLab node %(hostname)s""", 
-"""Hello,
-
-As part of PlanetLab node monitoring, we noticed that %(hostname)s has a network configuration error related to DNS or hostname lookups.  Often this can happen either due local configuraiton changes, or a misconfiguration of the node's DNS servers.  To resolve the issue we require your assistance.  All that is needed is to visit:
-
-       https://www.planet-lab.org/db/nodes/index.php?pattern=%(hostname)s
-
-Find the primary node network entry and confirm that the settings are correct.  
-
-If you use 'static' network configuration, verify that the DNS servers are correct.  If you are using 'dhcp' then you will need to confirm that the information returned for the node will allow it to perform lookups on it's own hostname.
-
-If you change the network settings, then select, "Download -> Download plnode.txt file for %(hostname)s" menu.  This will generate a new configuration file for your node.  Copy this file to the appropriate read-only media, either floppy or USB stick, and reboot the machine.  If you are using an All-in-One boot image, then you will need to download the All-in-One image instead, burn it to the appropriate media (CD or USB) and reboot.
-
-Please let us know if you need any assistance.
-
-Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-
-BootManager.log output follows:
----------------------------------------------------------
-%(bmlog)s
-""")
 
        nodeconfig_notice=(""" Please Update Configuration file for PlanetLab node %(hostname)s""", 
 """As part of PlanetLab node monitoring, we noticed %(hostname)s has an out-dated plnode.txt file with no NODE_ID or a mis-matched HOSTNAME.  This can happen either due to an initial configuration failure at your site, with information entered into our database, or after a software upgrade.  To resolve the issue we require your assistance.  All that is needed is to visit:
 
-       https://www.planet-lab.org/db/nodes/index.php?pattern=%(hostname)s
+    https://%(plc_hostname)s/db/nodes/index.php?pattern=%(hostname)s
 
 Then, select, "Download -> Download plnode.txt file for %(hostname)s" menu.  This will generate a new configuration file for your node.  Copy this file to the appropriate read-only media, either floppy or USB stick, and reboot the machine.
 
-There is no need to respond to this message if you're able to update the configuration file without difficulty and your node returns to normal operation.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue. 
+There is no need to respond to this message if you're able to update the configuration file without difficulty and your node returns to normal operation.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (%(support_email)s) so we can help resolve the issue. 
 
 Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 """)
 
-       bootcd=(""" Planetlab node %(hostname)s needs a new BootCD""", 
-"""As part of PlanetLab node monitoring, we noticed %(hostname)s has an out-dated BootCD: "%(version)".  This usually implies that you need to update both the BootCD and regenerate the planet.cnf file stored on the read-only floppy (Or read-only USB stick that stores the content of BootCD and planet.cnf).
-
-Instructions to perform the steps necessary for a BootCD upgrade are available in the Technical Contact Guide.
-    https://www.planet-lab.org/doc/guides/tech#NodeInstallation
-
-There's no need to respond to this message if you're able to follow the directions without difficulty and your node returns to normal operation. However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can help resolve the issue. 
-
-Thanks you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-       ssh=("""Planetlab node %(hostname)s down.""", """As part of PlanetLab node monitoring, we noticed node %(hostname)s is not available for ssh.
-
-Please check the node's connectivity and, if properly networked, power cycle the machine. Note that rebooting the machine may not fully resolve the problems we're seeing. Once the machine has come back up, please visit the Comon status page to verify that your node is accessible from the network.
-
-http://summer.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&select='address==%(hostbyteorder)s'
-
-There's no need to respond to this message if CoMon reports that your machine is accessible. However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (support@planet-lab.org) so we can resolve the issue. 
-
-Thanks.
-
-
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-
        baddns_notice=("""Planetlab node down: broken DNS configuration for %(hostname)s""", 
 """As part of PlanetLab node monitoring, we noticed the DNS servers used by the following machine(s) are not responding to queries.
 
@@ -708,14 +308,18 @@ To help us return this machine to running order, please verify that the register
 
 You may update the node's network information at the link below:
 
-    https://www.planet-lab.org/db/nodes/node_networks.php?id=%(interface_id)s
+    https://%(plc_hostname)s/db/nodes/node_networks.php?id=%(interface_id)s
 
-If you have any questions, please feel free to contact us at PlanetLab Support (support@planet-lab.org).
+If you have any questions, please feel free to contact us at PlanetLab Support (%(support_email)s).
 
 Thank you for your help,
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 """)
 
+#############################################################################
+#############################################################################
+#############################################################################
+
 
        filerw=("""Planetlab node %(hostname)s has a bad disk.""", """As part of PlanetLab node monitoring, we noticed %(hostname)s has a read-only filesystem.
 
@@ -723,7 +327,7 @@ Please verify the integrity of the disk and email the site if a replacement is n
 
 Thanks.
 
-  -- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 """)
 
 
@@ -733,46 +337,6 @@ Please verify that the NTP port (tcp/123) is not blocked by your site.
 
 Thanks.
 
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-  
-
-       removedSliceCreation=("""PlanetLab slice creation/renewal suspension.""","""As part of PlanetLab node monitoring, we noticed the %(loginbase)s site has less than 2 nodes up.  We have attempted to contact the PI and Technical contacts %(times)s times and have not received a response.  
-
-Slice creation and renewal are now suspended for the %(loginbase)s site.  Please be aware that failure to respond will result in the automatic suspension of all running slices on PlanetLab.
-
-
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-
-       suspendSlices=("""PlanetLab slices suspended.""","""As part of PlanetLab node monitoring, we noticed the %(loginbase)s site has less than 2 nodes up.  We have attempted to contact the PI and Technical contacts %(times)s times and have not received a response.  
-
-All %(loginbase)s slices are now suspended.  
-
-
-  -- PlanetLab Central (support@planet-lab.org)
-""")
-
-
-       pcu_broken=("""%(hostname)s failed to reinstall""","""Hello,
-
-   %(hostname)s was remotely rebooted via your power control unit but has not contacted PlanetLab since. It should contact upon every boot, hence we believe that either the node has some hardware problems, is not properly connected to the power control unit, or has network connectivity issues. Could you please reboot the node and watch the console for error messages? 
-
-
-Thanks.
-
--- PlanetLab Central (support@planet-lab.org)
-""")
-
-
-       no_pcu=("""Hello,
-
-We have set %(hostname)s to reinstall, but because your site does not have a power control unit, we are unable to powercycle the node.  Please  
-
-Thanks.
-
--- PlanetLab Central (support@planet-lab.org)
+  -- %(plc_name)s (%(support_email)s)
 """)
 
index 7f512e1..bd3ed0d 100755 (executable)
@@ -63,10 +63,31 @@ def check_node_state(rec, node):
        #################################################################
        # "Initialize" the findbad states into nodebad status if they are not already set
 
-       if node_state == 'DOWN' and ( node.status != 'offline' and node.status != 'down' ) and boot_state != 'disabled' :
-               print "changed status from %s to offline" % node.status
-               node.status = 'offline'
-               node.last_changed = datetime.now()
+       if node_state == 'DOWN':
+               if boot_state == 'disabled' and changed_lessthan(node.last_changed, 60) and \
+                       node.status != 'disabled':
+                       # NOTE: if changed less than 2 months, then we can allow this. 
+                       # otherwise, apply 'down' status after greater than 2 months (below).
+
+                       print "changed status from %s to %s" % (node.status, boot_state)
+                       node.status = boot_state
+                       node.last_changed = datetime.now()
+
+               if node.status not in ['offline', 'down', 'disabled']:
+                       print "changed status from %s to offline" % node.status
+                       node.status = 'offline'
+                       node.last_changed = datetime.now()
+                       
+
+       #if node_state == 'DOWN' and node.status not in ['offline', 'down', 'disabled']:
+       #       if boot_state != 'disabled':
+       #               print "changed status from %s to offline" % node.status
+       #               node.status = 'offline'
+       #               node.last_changed = datetime.now()
+       #       else:
+       #               print "changed status from %s to %s" % (node.status, boot_state)
+       #               node.status = boot_state
+       #               node.last_changed = datetime.now()
 
        if node_state == 'DEBUG' and node.status != 'monitordebug' and \
                                                                 node.status != 'disabled' and \
index edff7bd..aafa7d5 100755 (executable)
--- a/policy.py
+++ b/policy.py
@@ -76,7 +76,7 @@ def main(hostnames, sitenames):
                                # NOTE: there is a narrow window in which this command must be
                                #               evaluated, otherwise the notice will not go out.  
                                #               this is not ideal.
-                               sitehist.sendMessage('online_notice', hostname=host, viart=False)
+                               sitehist.sendMessage('online_notice', hostname=host, viart=False, saveact=True)
                                print "send message for host %s online" % host
 
 
@@ -253,6 +253,6 @@ if __name__ == "__main__":
                session.flush()
                sys.exit(0)
        except:
-               #email_exception()
+               email_exception()
                print traceback.print_exc();
                print "fail all..."
index dba81e9..15b4eb6 100644 (file)
@@ -164,7 +164,7 @@ class Root(controllers.RootController, MonitorXmlrpcServer):
        @expose(template="monitorweb.templates.welcome")
        def index(self):
                # log.debug("Happy TurboGears Controller Responding For Duty")
-               flash("Your application is now running")
+               flash("Welcome To MyOps!")
                return dict(now=time.ctime())
 
        @expose(template="monitorweb.templates.pcuview")
@@ -365,7 +365,7 @@ class Root(controllers.RootController, MonitorXmlrpcServer):
                                agg = prep_node_for_display(node)
                                sitequery = [agg.site]
                                nodequery += [agg]
-                               if agg.plc_pcuid:       # not None
+                               if agg.pcu: # .pcu.plc_pcuid:   # not None
                                        #pcu = FindbadPCURecord.get_latest_by(plc_pcuid=node.plc_pcuid)
                                        #prep_pcu_for_display(pcu)
                                        pcuquery += [agg.pcu]
@@ -503,6 +503,23 @@ class Root(controllers.RootController, MonitorXmlrpcServer):
                                
                return dict(query=query, fc=filtercount)
 
+       @expose(template="monitorweb.templates.actionsummary")
+       def actionsummary(self, since=7):
+               from monitor.wrapper.emailTxt import mailtxt
+               types = filter(lambda x: 'notice' in x, dir(mailtxt))
+               results = {}
+
+               try:
+                       since = int(since)
+               except:
+                       since = 7
+
+               for  t in types:
+                       acts = ActionRecord.query.filter(ActionRecord.action_type==t
+                                       ).filter(ActionRecord.date_created >= datetime.now() - timedelta(since))
+                       results[t] = acts.count()
+               return dict(results=results)
+
        @expose(template="monitorweb.templates.actionlist")
        def action(self, filter='all'):
                session.bind = metadata.bind
index 017b72a..a786f33 100644 (file)
     </div>\r
 \r
     <div id="footer">\r
-        <img src="${tg.url('/static/images/under_the_hood_blue.png')}"\r
-            alt="TurboGears under the hood" />\r
-        <p>TurboGears is a open source front-to-back web development framework\r
-            written in Python</p>\r
-        <p>Copyright &#169; 2007 Kevin Dangoor</p>\r
+        <!--img src="${tg.url('/static/images/under_the_hood_blue.png')}"\r
+            alt="TurboGears under the hood" /-->\r
+        <p>MyOps is an open source monitoring and management framework for MyPLC </p>\r
+        <p>Copyright &#169; 2007-2009 Princeton</p>\r
     </div>\r
 </body>\r
 \r
index b3aa16d..ed0f9e8 100644 (file)
@@ -145,7 +145,7 @@ from links import *
                                        <th mochi:format="int"></th>
                                        <th>History</th>
                                        <th>Hostname</th>
-                                       <th>last_contact</th>
+                                       <th>last_contact (cached)</th>
                                        <th>last_checked</th>
                                        <th nowrap='true'>Port Status</th>
                                        <th></th>
@@ -231,7 +231,7 @@ from links import *
                                        <td py:content="act.action_type"></td>
                                        <td><a class="ext-link" href="${plc_mail_uri(act.message_id)}">
                                                        <span py:if="act.message_id != 0" class="icon">${act.message_id}</span></a></td>
-                                       <td py:if="'bootmanager' in act.action_type">
+                                       <td py:if="'bootmanager' in act.action_type or 'unknown' in act.action_type">
                                                <a href="/monitorlog/bm.${act.hostname}.log">latest bm log</a>
                                        </td>
                                        <td py:if="'bootmanager' not in act.action_type">
index 9095267..d1f4b93 100644 (file)
@@ -3,44 +3,36 @@
     py:extends="'master.kid'">\r
 <head>\r
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>\r
-<title>Welcome to TurboGears</title>\r
+<title>Welcome to MyOps</title>\r
 </head>\r
 <body>\r
 \r
   <div id="sidebar">\r
     <h2>Learn more</h2>\r
-    Learn more about TurboGears and take part in its\r
-    development\r
+    Learn more about MyOps default policies, and take part in its development\r
     <ul class="links">\r
-      <li><a href="http://www.turbogears.org">Official website</a></li>\r
-      <li><a href="http://docs.turbogears.org">Documentation</a></li>\r
-      <li><a href="http://trac.turbogears.org/turbogears/">Trac\r
-        (bugs/suggestions)</a></li>\r
-      <li><a href="http://groups.google.com/group/turbogears"> Mailing list</a> </li>\r
+      <li><a href="https://svn.planet-lab.org/wiki/MonitorDocs">Documentation</a></li>\r
+      <li><a href="https://svn.planet-lab.org/wiki/MonitorPolicyForPlanetLab">Policy</a></li>\r
+      <li><a href="https://svn.planet-lab.org/svn/Monitor">Latest Source</a></li>\r
     </ul>\r
     <span py:replace="now">now</span>\r
   </div>\r
   <div id="getting_started">\r
     <ol id="getting_started_steps">\r
       <li class="getting_started">\r
-        <h3>Model</h3>\r
-        <p> <a href="http://docs.turbogears.org/1.0/GettingStarted/DefineDatabase">Design models</a> in the <span class="code">model.py</span>.<br/>\r
-          Edit <span class="code">dev.cfg</span> to <a href="http://docs.turbogears.org/1.0/GettingStarted/UseDatabase">use a different backend</a>, or start with a pre-configured SQLite database. <br/>\r
-          Use script <span class="code">tg-admin sql create</span> to create the database tables.</p>\r
+        <h3>Sites</h3>\r
+        <p> All monitored sites : <a href="site">Sites</a> <br/> </p>\r
       </li>\r
       <li class="getting_started">\r
-        <h3>View</h3>\r
-        <p> Edit <a href="http://docs.turbogears.org/1.0/GettingStarted/Kid">html-like templates</a> in the <span class="code">/templates</span> folder;<br/>\r
-        Put all <a href="http://docs.turbogears.org/1.0/StaticFiles">static contents</a> in the <span class="code">/static</span> folder. </p>\r
+        <h3>PCUs</h3>\r
+        <p> All PCUs : <a href="pcu">PCUs</a> <br/> </p>\r
       </li>\r
       <li class="getting_started">\r
-        <h3>Controller</h3>\r
-        <p> Edit <span class="code"> controllers.py</span> and <a href="http://docs.turbogears.org/1.0/GettingStarted/CherryPy">build your\r
-          website structure</a> with the simplicity of Python objects. <br/>\r
-          TurboGears will automatically reload itself when you modify your project. </p>\r
+        <h3>Nodes</h3>\r
+        <p> All nodes: <a href="node">Nodes</a> <br/> </p>\r
       </li>\r
     </ol>\r
-    <div class="notice"> If you create something cool, please <a href="http://groups.google.com/group/turbogears">let people know</a>, and consider contributing something back to the <a href="http://groups.google.com/group/turbogears">community</a>.</div>\r
+    <!--div class="notice"> If you create something cool, please <a href="http://groups.google.com/group/turbogears">let people know</a>, and consider contributing something back to the <a href="http://groups.google.com/group/turbogears">community</a>.</div-->\r
   </div>\r
   <!-- End of getting_started -->\r
 </body>\r