clearer names for actions, and infer actions better
[monitor.git] / monitor / wrapper / emailTxt.py
index bb03942..7f0f86f 100644 (file)
@@ -52,17 +52,39 @@ 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,
+  -- %(plc_name)s (%(support_email)s)
+""")
+
+       pcuerror_notice=("""Please help us configure your PCU: %(pcu_name)s""",
+"""During our standard monitoring of your site we noticed that the following
+PCU is misconfigured:
+
+    %(pcu_name)s
+       %(pcu_errors)s
+You can learn more details about the problem by visiting the link below.
+
+    https://%(monitor_hostname)s/monitor/simpleview?loginbase=%(loginbase)s
+
+If you need to change the PCU configuration in the PLC database:
+
+    https://%(plc_hostname)s/db/sites/pcu.php?id=%(plc_pcuid)s
+
+We would like to save you time by taking care of as many administrative situations for your site's machines as possible without disturbing you.  Errors like these prevent us from being able to remotely administer your machines, and so we must solicit your help using messages like these.
+
+So, any help and time that you can offer now to help us remotely administer your machines will pay off for you in the future.
+
 Thank you very much for your help,
   -- %(plc_name)s (%(support_email)s)
 """)
 
        pcufailed_notice =("""Could not use PCU to reboot %(hostname)s""",
 
-"""We tried to use the PCU registered for %(hostname)s, but for some reason 
-the host did not come back online.  You may be able to learn more by visiting
-this link:
+"""We tried to use the PCU registered for %(hostname)s, but for some reason the host did not come back online.  This may be for several reasons, and you can learn more by visiting this link:
+
+    %(pcu_name)s
 
-    https://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
+    https://%(monitor_hostname)s/monitor/simpleview?loginbase=%(loginbase)s
 
 We need your help resolving this issue in a few ways:  
 
@@ -71,7 +93,7 @@ We need your help resolving this issue in a few ways:
     that there is a problem with the PCU configuration, we can help you
     resolve that independently.
 
- 2. If it is possible, please correcct the above PCU problem, or let us know
+ 2. If it is possible, please correct the above PCU problem, or let us know
     what steps you are taking.  By enabling us to take administrative actions
     automatically without your intervention, you will save time in the future 
     the next time we need to reboot this machine, because we will be able to 
@@ -99,7 +121,7 @@ This notice is simply to let you know that:
 
 is online and operational.  
 
-    http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
+    http://%(monitor_hostname)s/monitor/simpleview?loginbase=%(loginbase)s
 
 Thank you very much for your help!
   -- %(plc_name)s (%(support_email)s)
@@ -118,6 +140,29 @@ This notice is simply to let you know that:
 
 appears stuck in a debug mode.  To try to correct this, we're trying to rerun BootManager.py.  
 If any action is needed from you, you will recieve additional notices.  Thank you!
+       """)
+       firewall_notice=("""Host %(hostname)s blocked by a firewall""",
+       """
+This notice is simply to let you know that:
+    %(hostname)s
+
+has some ports that appear to be blocked, making the node unusable.  While
+some ports are open, a fully functional node needs all ports accessible at all
+times.  Please see the following for the list of requirements for hosting a
+node:
+
+    http://www.planet-lab.org/hosting
+
+We will consider the node 'DOWN' until the ports are unblocked.
+
+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_hostname)s/monitor/simpleview?loginbase=%(loginbase)s
+
+Thank you very much for your help,
+  -- %(plc_name)s (%(support_email)s)
        """)
        down_notice=("""Host %(hostname)s is down""",
        """
@@ -130,7 +175,7 @@ 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_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
+    http://%(monitor_hostname)s/monitor/simpleview?loginbase=%(loginbase)s
 
 Thank you very much for your help,
   -- %(plc_name)s (%(support_email)s)
@@ -145,16 +190,16 @@ 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_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
+    http://%(monitor_hostname)s/monitor/simpleview?loginbase=%(loginbase)s
 
 Thank you very much for your help,
   -- %(plc_name)s (%(support_email)s)
 
 Legend:
 
-   - no penalties applied
-   - site is disabled.  no new slices can be created.
-  2+ - all existing slices will be disabled.
+   0 - no penalties applied
+  -1 - site is disabled.  no new slices can be created.
+  -2 - all existing slices will be disabled.
        """)
 
        increase_penalty=("""Privilege reduced for site %(loginbase)s""",
@@ -166,17 +211,17 @@ 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_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
+    http://%(monitor_hostname)s/monitor/simpleview?loginbase=%(loginbase)s
 
 Thank you very much for your help,
   -- %(plc_name)s (%(support_email)s)
   
 Legend:
 
-  0  - no penalty applied
-   - site is disabled.  no new slices can be created.
-  2+ - all existing slices will be disabled.
-       """)
+   0 - no penalties applied
+  -1 - site is disabled.  no new slices can be created.
+  -2 - all existing slices will be disabled.
+""")
 
        newbootcd_notice=("""Host %(hostname)s needs a new BootImage""", """
 We noticed the following node has an out-dated BootImage: 
@@ -196,9 +241,25 @@ Thank you for your help,
   -- %(plc_name)s (%(support_email)s)
 """)
 
+       noblockdevice_notice=("""Cannot Detect Disks on %(hostname)s""", 
+"""As part of PlanetLab node monitoring, we noticed that we were not able to detect any hard disks in your machine.  
+
+    %(hostname)s  
+
+This may be the case for a number of reasons:
+    * the hardware is very new and needs a new driver,
+    * the hardware is very old is no longer supported,
+    * the hard disk was physically removed, 
+    * the hard disk cable is loose or disconnected,
+
+Please help us investigate and let us know if there is anything that we can do to assist in getting your machine up and running again.
+
+Thank you for your help,
+  -- %(plc_name)s (%(support_email)s)
+""")
 
        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.
+"""As part of PlanetLab node monitoring, we noticed that we were not able to recognize all the hardware in your machine.  This means that either it is so new that it needs a new BootCD, or that it is so old that it is no longer supported.
 
     %(hostname)s  
 
@@ -208,11 +269,11 @@ The only step that you need to take is to choose which media you prefer, either
 
 %(url_list)s
 
-Instructions to burn or copy these All-in-One images to the appropriate media are available in the Technical Contact's Guide.
+Instructions to burn or copy these All-in-One images to the appropriate media are available in the Technical Contacts Guide.
 
     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_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.  
+If your node returns to normal operation after following these directions, then there is no need to respond to this message.  However, if there are any console messages relating to the nodes 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 have taken.  
 
 Thank you for your help,
   -- %(plc_name)s (%(support_email)s)
@@ -233,7 +294,7 @@ Thank you for your help,
 While trying to automatically recover this machine:
 
     http://%(plc_hostname)s/db/nodes/index.php?pattern=%(hostname)s
-    https://%(monitor_hostname)s/monitor/pcuview?hostname=%(hostname)s
+    https://%(monitor_hostname)s/monitor/detailview?hostname=%(hostname)s
 
 We encountered an unknown situation.  Please re-code to handle, or manually intervene to repair this host.
 
@@ -253,7 +314,7 @@ While trying to automatically recover this machine:
 
     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.
+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 Minimal RAM was not satisfied.
 
 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.  
 
@@ -284,7 +345,7 @@ The output of `dmesg` follows:
 
 
        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.  
+"""As part of PlanetLab node monitoring, we noticed %(hostname)s has an out-dated configuration.
 
 Either our boot scripts cannot find it because the boot media is corrupted, or it has no NODE_ID or a mis-matched HOSTNAME.  This can happen either due to a configuration mistake at your site, with bad information entered into our database, or after a necessary software upgrade.  To resolve the issue we require your assistance.  All that is needed is to visit:
 
@@ -292,7 +353,7 @@ Either our boot scripts cannot find it because the boot media is corrupted, or i
 
 Then double check the network settings for your host.
 
-Then, select, "Download -> Download ISO image for %(hostname)s" menu.  This will generate a new All-in-one BootImage file for your node.  Copy this file to the appropriate read-only media, and reboot the machine.
+If the network settings are correct, then, select, "Download -> Download image for %(hostname)s" menu.  This will generate a new All-in-one BootImage file for your node.  Copy this file to the appropriate read-only media, and reboot the machine.
 
 There is no need to respond to this message. If you're able to update the boot image without difficulty and your node returns to normal operation, please accept our thanks.  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.