Tagging module Monitor - Monitor-1.0-16
[monitor.git] / findbad.py
index e156856..630f1c5 100755 (executable)
@@ -81,6 +81,8 @@ EOF                   """)
                                                                'princeton_comon_procs' : '', 'sshport' : None})
        except:
                print traceback.print_exc()
+               from nodecommon import email_exception
+               email_exception()
                sys.exit(1)
 
        ### RUN SSH ######################
@@ -93,14 +95,14 @@ EOF                 """)
        oval = values['kernel']
        if "2.6.17" in oval or "2.6.2" in oval:
                values['ssh'] = 'SSH'
-               values['category'] = 'ALPHA'
+               values['category'] = 'PROD'
                if "bm.log" in values['bmlog']:
                        values['state'] = 'DEBUG'
                else:
                        values['state'] = 'BOOT'
        elif "2.6.12" in oval or "2.6.10" in oval:
                values['ssh'] = 'SSH'
-               values['category'] = 'PROD'
+               values['category'] = 'OLDPROD'
                if "bm.log" in values['bmlog']:
                        values['state'] = 'DEBUG'
                else:
@@ -203,6 +205,8 @@ EOF                 """)
        except:
                b_except = True
                traceback.print_exc()
+               from nodecommon import email_exception
+               email_exception()
 
        plc_lock.release()
        if b_except: return (None, None)
@@ -240,6 +244,8 @@ EOF                 """)
        except:
                b_except = True
                traceback.print_exc()
+               from nodecommon import email_exception
+               email_exception()
 
        plc_lock.release()
        if b_except: return (None, None)
@@ -397,6 +403,8 @@ if __name__ == '__main__':
                main()
        except Exception, err:
                print traceback.print_exc()
+               from nodecommon import email_exception
+               email_exception()
                print "Exception: %s" % err
                print "Saving data... exitting."
                database.dbDump(config.dbname, externalState)