home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2003-06-24 | 121.7 KB | 3,255 lines
<html> <head> <title>AlertWatch Display</title> <link rel="stylesheet" type="text/css" href="css/rpmstyle.css"> <style> .EventFilter { border-style : solid; border-width : thin; overflow : clip; background-color:white } .EventFilter { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white} .EventLog { border-style : solid; border-width : thin; overflow : scroll; background-color:white } .EventLog { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white} .EventConfig { overflow : none; background-color:activeborder } .EventConfig { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white} .VASelectBox { height : 270px; width : 375px; background-color: white; color: infotext; } .VASelectBox { border-style : solid; border-width : 2px; } .VASelectBox { border-top-color : #555555; border-left-color : #555555; border-bottom-color : #E0E0E0; border-right-color : #E0E0E0} .VAMainBox { border: none; background-color : activeborder; } .PopUpBox { background-color:activeborder; position:absolute; margin:0; padding:0; border : solid thin; } .PopUpBox { border-top-color : #E0E0E0; border-left-color : #E0E0E0; border-bottom-color : #555555; border-right-color : #555555 } </style> </head> <body class="bodyc" style="margin:2px;" language="JavaScript" RPMHostIP="!BreakoutBot:MonitorIP!" RPMHostPort="!BreakoutBot:MonitorPort!" RPMUserName="!BreakoutBot:UserName!" BOBDone="!BreakoutBot:Done!" onload="top.banner.savePageCoord(event,document.body,'ViewAlerts'); InitRpmCC_VA();" onbeforeunload="DiscoRpmCC_VA()" onresize="processSizeChange()" onclick="checkClick()" onkeydown="processBSP()"> <script LANGUAGE="JavaScript"> <!-- //border-style : solid; border-width : thin; var VAMode = ""; // Mode of Operation, New, Edit, Delete, Lookup, ObjectLookup var ALupMode = ""; // Lookup Mode of Operation, Computer, Counter var AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation var AlertSelectIdx = 0; // Index of currently selected Alert var VA_CommBusy = 0; // Comm busy flag var CurObjName = ""; // Current Object Name var CurObjID = ""; // Current Object ID var CurObjDesc = ""; // Current Object Desc var CurCntrName = ""; // Name of Current Open Counter var CurCntrDesc = ""; // Current Counter Description var CurCntrID = ""; // Current Counter ID var CurAlertID = ""; // Current Alert Name selected in Configure var CurAlertName = ""; // Current Alert Group Name selected in Configure var CurAlertDesc = ""; // Current Alert Group Description var FilterRecCnt = 0; // Count of records in the filter var FilterSelectIdx = 0; // Filter Select Index var AudioOutBusy = false; // Flag for AudioOut var VA_Tid = null; // AudioOut free timeout var Tid = null, CTid= null, ATid= null; var ELogWinInit = ""; // save for ElogWin init HTML var ELBgFlg = 0; // Alert Event Log Background color toggle var bdH = 0; var byM = null; var borderSz = 2; // Thin Bord is 2pixels var ValidateFilter = true; // Validate Alert Filter on entry var Hp = null; // Host port var ReconnectEvent = false; var AC_CompStoreArr = new Array(); var AlertSelectIdx = 0; // Index of currently selected Alert var AlertStoreArr = new Array(); var AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation var FILE_DELETED = 1; var FILE_STRING_MATCH = 2; var FILE_DATE_CHANGE = 4; var FILE_SIZE_CHANGE = 8; var FILE_SIZE_MAX = 16; var NOT_RUNNING_NO_RESTART = 1; var NOT_RUNNING_RESTARTED = 2; var NOT_RUNNING_RESTART_FAILED = 4; var RUNNING_HALTED = 8; var RUNNING_NOT_HALTED = 16; var RUNNING_EXCEEDED_CPU = 32; var RUNNING_EXCEEDED_MEMORY = 64; var RUNNING_EXCEEDED_CPU_HALTED = 128; var RUNNING_EXCEEDED_MEMORY_HALTED = 256; // Capture and ignore script errors window.onerror = wwScrErr; function wwScrErr() { return true; } /* On Load tell the Comm control to Connect to the Server */ function InitRpmCC_VA() { top.MainLoaded = true; // Flag that Main is now loaded top.banner.savePageCoord(event,document.body,"ViewAlerts"); byM = 2*parseFloat(document.body.style.margin); processSizeChange(); /* Initialize the Calendars Used for Definig Alerts to be Viewed */ Calendar4 = Calendar_init("Calendar4"); // Start Date calendar VA_StartDate.CalObj = Calendar4; Calendar5 = Calendar_init("Calendar5"); // Stop Date calendar VA_StopDate.CalObj = Calendar5; /* get Audio Alert checkbox state */ cc = top.banner.RpmCC_Ban.RegGetKey(top.banner.ServerID+"AudioAlertState"); // get state if ( cc == "unchecked" ) { // If not checked AlertAudioEnabled.checked = ""; } else { AlertAudioEnabled.checked == "CHECKED"; } /* Connect to Server and initiate Alert Group Lookup */ Hp = parseInt(document.body.RPMHostPort,10); RpmCC_VA.Connect(document.body.RPMHostIP,Hp, ""); } function processReconnect() { Tid = null; if ( RpmCC_VA.IsConnected() ) { Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection return; } RpmCC_VA.Connect(document.body.RPMHostIP,Hp, ""); } function processConnectConfirmed() { if ( ReconnectEvent == false ) { top.banner.processStartComm(); processVALookupReset(); // go do Alert Lookup processLogAndFilterWindows(); // initialize Log and Filter Windows ReconnectEvent = true; } top.Rstatus.Pstat("Connected"); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection } function processConnectionCheck() { Tid = null; RpmCC_VA.SendKeepAlive("Check"); Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection } // Process Database Change event function processDBChanged() { CTid = null; top.banner.processStartComm(); // Insure Configure pop-up is hidden and disabled //ConfigButton.className = "BoxButtonD"; // disable button ConfigButton.disabled = "disabled"; // disable button closeCalendarFields();// close calendar fields if opened PopUpDiv.style.display="none"; goSaveLogEntries(); // Clear Stores AlertStoreArr.length=0; AC_ServicesStoreArr.length = 0; AC_CompStoreArr.length = 0; ValidateFilter = true; AlertSelectIdx = 0; // Reset Index of currently selected Alert processVALookupReset(); // go do Alert Lookup top.Rstatus.StatDB.style.display = "none"; AL_AlertSel.style.display = "none"; } /* On Unload tell the Comm control to Disconnect from the Server */ function DiscoRpmCC_VA() { top.BannerMenuShow(); RpmCC_VA.Disconnect(); if (VA_CommBusy == 1) { // stop logo animation if Comm busy flag set top.banner.processStopComm(); } closeCalendarFields();// close calendar fields if opened // Save Audio Alert checkbox state cc = ( AlertAudioEnabled.checked == false ) ? "unchecked" : "checked"; top.banner.RpmCC_Ban.RegSetKey(top.banner.ServerID+"AudioAlertState",cc); // set state goSaveLogEntries(); /* Clear AudioOut Timer if set */ if ( VA_Tid != null ) { clearTimeout(VA_Tid); } if ( Tid != null ) { clearTimeout(Tid); } if ( CTid != null ) { clearTimeout(CTid); } if ( ATid != null ) { clearTimeout(ATid); } } function goSaveLogEntries() { /* Redefine Log Time based on Current Time */ var dob = new Date(); // get current d/t var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear(); lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds(); ELogParams.logtime = lt; // update the D/T stamp ELogParams.ELBgFlg = ELBgFlg; // save background flag /* Save the Log Display, and Filter Display & Store on the Banner Page before exiting */ top.banner.saveLogDisplay(ELogWin.innerHTML); top.banner.saveLogFilter(ELogViewCur.innerHTML); AL_AlertSel.innerText = ""; // clear } // Unconditionally close calendar fields from Configure Filter if open function closeCalendarFields() { if ( VA_calwin.CalState == "1" ) { // if Calendar opended processCalendarClick(VA_StartDate); // close it } if ( VA_scalwin.CalState == "1" ) { // if Calendar opended processCalendarClick(VA_StopDate); // close it } } // Process Display View Size Change var SCbsy = false; var PuPW = "500px", PuPWu=500, PuPH = "280px", PuPHu=280, PuPCH = "235px"; var VFilW = "630px" function processSizeChange() { if ( SCbsy ) return; SCbsy = true; // Display Height and Width bCh = document.body.clientHeight; bCw = document.body.clientWidth; // Determine minimums bCh = (bCh < bdH+byM+270) ? bdH+byM+270 : bCh; bCw = (bCw < PuPWu) ? PuPWu : bCw; document.body.scroll = (bCw <= PuPWu || bCh <= bdH+byM+270) ? "yes" : "no"; // Set Height/Widths for Chart and Button areas VA_MainBox.style.height = bCh-(bdH+byM-borderSz)-10; VA_MainBox.style.width = bCw-byM-4; VA_MainBox.style.display = ""; ELogWinFullH = "" + (bCh-TitleDivSize); var ELWinc = (bCh-TitleDivSize-175); ELWinc = (ELWinc < 0) ? 0 : ELWinc; ELogWinSplitH = "" + ELWinc; ELogWin.style.height = ( ELogViewCurLine.style.display == "none" ) ? ELogWinFullH : ELogWinSplitH; ELogViewCur.style.width = (bCw-byM-34 > 530) ? "530px" : bCw-byM-34; //PopUpContext Menu PopUpContextSize(bCw); // PopUp PuPLeft = (bCw-PuPWu)/2; PuPTop = (bCh-PuPHu)/2; PopUpDiv.style.left = PuPLeft+"px"; PopUpDiv.style.top = "25px"; PopUpDiv.style.height = (bCh-110); PopUpDiv.style.width = PuPW; VA_Select.style.height = (bCh-130); SCbsy = false; } /* Initial Alert Lookup Request */ function processVALookupReset() { AlertLupRecCount = 0; // clear Lookup record counter if ( RpmCC_VA.AlertGroupLookup("*") ) { top.Rstatus.Pstat("Unable to start the Alert LOOKUP request",true); processResetButton(); } else { VA_CommBusy = 1; // set Comm busy flag top.Rstatus.Pstat("One moment while Alert LOOKUP request completes"); } } /* Alert Lookup Op Complete */ function processAlertOpComplete() { AL_AlertSel.style.display = "none"; // insure hidden if (AlertLupRecCount == 0) { // check if any records found top.Rstatus.Pstat("No record matches found for Alert LOOKUP request",true); } else { // Do Services Lookup ServicesRecCount = 0; // reset count ALupMode = "ServicesLookup"; rstat = RpmCC_VA.ServicesLookup("","","ComputerID,ID DESC"); if ( rstat ) { // if unable to initiate request ALupMode = ""; // reset top.Rstatus.Pstat("Unable to start the Services LOOKUP request",true); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while Services LOOKUP request completes"); return; } } processResetButton(); } // Print Log var DiscStatWindow = null; function processPrintStatus() { if ( !top.banner.IE55orBetter ) { alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site"); return; } FakeBut.click(); // simulate event to call "savePageCoord(...)" var wprop = "height="+top.banner.bCh+",width="+top.banner.bCw wprop += ",top="+(top.banner.bY-28)+",left="+(top.banner.bX-4)+",scrollbars"; var rName = ""+Math.random(); // use Random number to get unique Window name rName = rName.substring(2,rName.length); DiscStatWindow = window.open("",rName,wprop); if ( DiscStatWindow == null ) { return; } var dh = "<html><head><title>MonitorIT - AlertWatch Status Report</title>"; dh += "<link rel='stylesheet' type='text/css' href='css/rpmstyle.css'></head><body"; dh += " title='Exit to Close Window when Printing is complete'>"; dh += ELogWin.innerHTML; dh += '<script LANGUAGE="JavaScript">ploghdr.border="1"; ploghdr1.width="173"; ploghdr2.width="173"; ploghdr3.width="107"; ploghdr4.width="47"; window.focus();'; dh += ' </script></body></html>'; DiscStatWindow.document.open(); DiscStatWindow.document.write(dh) DiscStatWindow.document.close(); DiscStatWindow.print(); } /* Initialize the Log and Filter Windows */ function processLogAndFilterWindows() { var hs = ""; outputLogWindowHeader(); ELogWinInit = ELogWin.innerHTML; // save for clear log outputFilterWindowHeader(); /* Restore the Log Display if Previously Saved */ hs = top.banner.restoreLogDisplay(); if ( hs != "" ) { ELogWin.innerHTML = hs; ELBgFlg = ELogParams.ELBgFlg; // restore } /* Restore the Filter Display and Storage if Previously Saved */ hs = RpmCC_VA.RegGetKey(top.banner.ServerID+"LogFilterSave"); if ( hs != "" ) { ELogViewCur.innerHTML = hs; FilterRecCnt = VA_FilterStore.length / FilterRecSize; } } function outputLogWindowHeader() { /* Format Output to Log Window */ FOps = "<table id='ploghdr' border='0' cellpadding='0' cellSpacing='1' width='100%'>"; FOps += "<tr><td id='ploghdr1' width='170' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Server/Device Name" + "</td>"; FOps += "<td id='ploghdr2' width='170' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Alert Type" + "</td>"; FOps += "<td id='ploghdr3' width='106' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Date/Time Stamp" + "</td>"; FOps += "<td id='ploghdr4' width='65' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Status" + "</td>"; FOps += "<td width='*' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Action Taken" + "</td>" FOps += "</tr></table>"; ELogWin.insertAdjacentHTML("afterBegin",FOps); } function outputFilterWindowHeader() { /* Format Output to Filter Window */ FOps = "<table border='0' cellpadding='0' cellSpacing='1' width='500'>"; FOps += "<tr><td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Watch/Alert Name" + "</td>"; FOps += "<td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Watch/Alert" + "</td>"; FOps += "</tr></table>"; ELogViewCur.insertAdjacentHTML("beforeEnd",FOps); } // Process the Unsolicited Alerts that were Accumulated function processAccumulatedAlerts() { var PrevAgid = "", hs = null; /* Get and process the Unsolicited Alerts accumulated */ var Tflg = ELogParams.logtime; // Time stamp of last Log entry if ( Tflg == "0" ) { // get Start Time for Client Tflg = top.banner.getLogStartTime(); ELogParams.logtime = Tflg; } // Get Win Service Alerts var Uaa = top.banner.getUnsolicitedWinServicesAlertArray(); top.banner.enableUnsolicitedWinServicesAlerts(); var UaaArray = new Array(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID~LogFileID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedWinServicesAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } // Get FileWatch File Check Alerts PrevAgid = ""; // reinitialize var Uaa = top.banner.getUnsolicitedFileCheckAlertArray(); top.banner.enableUnsolicitedFileCheckAlerts(); var UaaArray = new Array(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID~LogFileID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedFileCheckAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } // Get SyslogWatch Alerts PrevAgid = ""; // reinitialize var Uaa = top.banner.getUnsolicitedSyslogCheckAlertArray(); top.banner.enableUnsolicitedSyslogCheckAlerts(); var UaaArray = new Array(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID~LogFileID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedSyslogCheckAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } // Get ProcessWatch Process Check Alerts PrevAgid = ""; // reinitialize var Uaa = top.banner.getUnsolicitedProcessCheckAlertArray(); top.banner.enableUnsolicitedProcessCheckAlerts(); var UaaArray = new Array(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID~LogFileID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedProcessCheckAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } // Get ServerWatch IP Service Alerts PrevAgid = ""; // reinitialize var Uaa = top.banner.getUnsolicitedServiceAlertArray(); top.banner.enableUnsolicitedServiceAlerts(); var UaaArray = new Array(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID~LogFileID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedServiceAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } // Get Event Log Alerts PrevAgid = ""; // reinitialize Uaa = top.banner.getUnsolicitedEventLogAlertArray(); top.banner.enableUnsolicitedEventLogAlerts(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileDataID for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID~LogFileDataID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedEventLogAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } // Get SNMP Trap Alerts PrevAgid = ""; // reinitialize Uaa = top.banner.getUnsolicitedSNMPAlertArray(); top.banner.enableUnsolicitedSNMPAlerts(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~TrapLogRecID for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID~TrapLogRecID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedSNMPAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } // Get Object:Counter Alerts PrevAgid = ""; // reinitialize Uaa = top.banner.getUnsolicitedAlertArray(); top.banner.enableUnsolicitedCounterAlerts(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs UaaArray = UaaArray.sort(); // Sort it to not process duplicates for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } // Get User Alerts Uaa = top.banner.getUnsolicitedUserAlertArray(); top.banner.enableUnsolicitedUserAlerts(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~CID for ( var i=0; i<UaaArray.length; i++ ) { if ( (hs = UaaArray[i]) != "" ) { // get an AlertGrp ID~CID processUnsolicitedUserAlertEvent(hs,Tflg); } } if ( ELogParams.logeventid != "" ) { //ClearButton.className = "BoxButton"; // enable button ClearButton.disabled = ""; // enable button } } /* Play specified WAV file as an AudioAlert */ function processAlertAudioOut() { if ( AlertAudioEnabled.checked == false || AudioOutBusy == true ) return; // exit if not enabled or Busy RpmCC_VA.DoMessageBeep(0x40); // System Asterisk } function freeAudioOut() { AudioOutBusy = false; } /* Process the Unsolicited Object:Counter Alert Event */ function processUnsolicitedAlertEvent(Agid,Tflg) { if ( CheckAlertFilter(Agid,Tflg) == false ) return; // if not in filter top.Rstatus.Pstat("CounterWatch Alert Broadcast Received",true); addElementToSelect(VA_CounterEventStore,Agid); //+0 addElementToSelect(VA_CounterEventStore,Tflg); //+0 if ( ATid == null ) { ATid = setTimeout("processCounterAlert()",1500); // Delay 1.5 sec then process } } var CounterEventRecLth = 2; function processCounterAlert() { if ( VA_CounterEventStore.length == 0 ) { ATid = null; return; } var Agid = VA_CounterEventStore.options[0].text; var Tflg = VA_CounterEventStore.options[1].text; for ( var i=0; i<VA_CounterEventStore.length; i+=CounterEventRecLth ) { if (VA_CounterEventStore.options[i].text == Agid) { VA_CounterEventStore.remove(i); // remove VA_CounterEventStore.remove(i); // remove i-=CounterEventRecLth;// readjust } } // Recheck filter and get index to entry if ( CheckAlertFilter(Agid,null) ) { Tflg = (Tflg == "null") ? ELogParams.logtime : Tflg; var FilObj = VA_FilterStore; // Filter Store var Scid = ""; // Computer Id Array var Aedt = "12/31/2030 23:59:59"; // default end d/t if ( FilObj.length == 0 ) { // if filter is empty var WrkArr = new Array(); var CACArray = new Array(); getAlertName(Agid); // get index to alert store var aix = AlertSelectIdx * AlertRecLength; CACArray = AlertStoreArr[aix+10].split(";"); /* Compute Array of Computer IDs */ var MCC = --CACArray.length; // adjust for null last entry for ( var i=0; i<MCC; i++ ) { // get Computer ID from triplet of "CompId.ObjId,CntrId" WrkArr = CACArray[i].split(","); if ( i > 0) { Scid += ","; // array id separator } Scid += WrkArr[0]; } } else { Scid = FilObj.options[FilterSelectIdx+1].text; // Comp ID from the Filter Aedt = FilObj.options[FilterSelectIdx+4].text; // Filter End D/T } /* Initiate Read of Event Table for Events Matching Criteria */ if ( RpmCC_VA.AlertEventsLookup(Agid,Scid,Tflg,Aedt) ) { top.Rstatus.Pstat("Unable to start the Alert Event LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag return; // wait until complete } } ATid = setTimeout("processCounterAlert()",1000); // Delay 1 sec then try again } /* Process the Unsolicited File Check Alert Event */ function processUnsolicitedFileCheckAlertEvent(AGID_FCLID,Tflg) { var warr = new Array(); warr = AGID_FCLID.split("~"); // split out Alert Grp ID and File Check Log Record ID if ( CheckAlertFilter(warr[0],Tflg) == false ) return; // if not in filter top.Rstatus.Pstat("FileWatch Alert Broadcast Received",true); /* Initiate Read of File Check Log Data */ if ( RpmCC_VA.FileCheckLogLookup(warr[1]) ) { top.Rstatus.Pstat("Unable to start the File Check Log Data Record LOOKUP request",true); } } // File Check Alert Log Record function processAlertFileCheckRecord(LogRecStrg) { var WLRec = new Array(); WLRec = LogRecStrg.split("~"); // parse the Log Record // Alert Group ID, Computer ID, Time Stamp if ( IsDisplayInLog(WLRec[3],WLRec[2],WLRec[8]) == false ) return; // Didn't pass filter test // Check for duplicate by comparing versus Event ID array var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = WLRec[0]+"~"+WLRec[3]; // Event ID = FileCheckLogID~AlertGroupID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } var CompID = WLRec[2]; // Computer ID // Save File Check Log Record string in temporary store addElementToSelect(VA_ServEventStore,CompID); //+0 addElementToSelect(VA_ServEventStore,"FileCheckLog~"+LogRecStrg); // Lookup Computer Name and Description if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { // if read not already in progress, if ( !goCheckServEventStore() ) { goCheckUserEventStore(); } } } /* Process the Unsolicited Process Check Alert Event */ function processUnsolicitedProcessCheckAlertEvent(AGID_FCLID,Tflg) { var warr = new Array(); warr = AGID_FCLID.split("~"); // split out Alert Grp ID and Process Check Log Record ID if ( CheckAlertFilter(warr[0],Tflg) == false ) return; // if not in filter top.Rstatus.Pstat("ProcessWatch Alert Broadcast Received",true); /* Initiate Read of File Check Log Data */ if ( RpmCC_VA.ProcessCheckLogLookup(warr[1]) ) { top.Rstatus.Pstat("Unable to start the ProcessWatch Log Data Record LOOKUP request",true); } } // Process Check Alert Log Record function processAlertProcessCheckRecord(LogRecStrg) { var WLRec = new Array(); WLRec = LogRecStrg.split("~"); // parse the Log Record // Alert Group ID, Computer ID, Time Stamp if ( IsDisplayInLog(WLRec[3],WLRec[2],WLRec[8]) == false ) return; // Didn't pass filter test // Check for duplicate by comparing versus Event ID array var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = WLRec[0]+"~"+WLRec[3]; // Event ID = FileCheckLogID~AlertGroupID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } var CompID = WLRec[2]; // Computer ID // Save File Check Log Record string in temporary store addElementToSelect(VA_ServEventStore,CompID); //+0 addElementToSelect(VA_ServEventStore,"ProcessCheckLog~"+LogRecStrg); // Lookup Computer Name and Description if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { // if read not already in progress, if ( !goCheckServEventStore() ) { goCheckUserEventStore(); } } } /* Process the Unsolicited Syslog Check Alert Event */ function processUnsolicitedSyslogCheckAlertEvent(AGID_FCLID,Tflg) { var warr = new Array(); warr = AGID_FCLID.split("~"); // split out Alert Grp ID and Syslog Check Log Record ID if ( CheckAlertFilter(warr[0],Tflg) == false ) return; // if not in filter top.Rstatus.Pstat("SYSLOGWatch Alert Broadcast Received",true); /* Initiate Read of File Check Log Data */ if ( RpmCC_VA.SyslogCheckLogLookup(warr[1]) ) { top.Rstatus.Pstat("Unable to start the Syslog Check Log Data Record LOOKUP request",true); } } // SYSLOG Check Alert Log Record function processAlertSyslogCheckRecord(LogRecStrg) { var WLRec = new Array(); WLRec = LogRecStrg.split("~"); // parse the Log Record // Alert Group ID, Computer ID, Time Stamp if ( IsDisplayInLog(WLRec[3],WLRec[2],WLRec[8]) == false ) return; // Didn't pass filter test // Check for duplicate by comparing versus Event ID array var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = WLRec[0]+"~"+WLRec[3]; // Event ID = FileCheckLogID~AlertGroupID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } var CompID = WLRec[2]; // Computer ID // Save File Check Log Record string in temporary store addElementToSelect(VA_ServEventStore,CompID); //+0 addElementToSelect(VA_ServEventStore,"SyslogCheckLog~"+LogRecStrg); // Lookup Computer Name and Description if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { // if read not already in progress, if ( !goCheckServEventStore() ) { goCheckUserEventStore(); } } } /* Process the Unsolicited Win Services Alert Event */ function processUnsolicitedWinServicesAlertEvent(AGID_WSLID,Tflg) { var warr = new Array(); warr = AGID_WSLID.split("~"); // split out Alert Grp ID and NT Services Log Record ID if ( CheckAlertFilter(warr[0],Tflg) == false ) return; // if not in filter top.Rstatus.Pstat("WinServicesWatch Alert Broadcast Received",true); /* Initiate Read of Win Services Log Data */ if ( RpmCC_VA.NTServicesLogLookup(warr[1]) ) { top.Rstatus.Pstat("Unable to start the Windows Services Log Data Record LOOKUP request",true); } } var WSAE_Arr = new Array(); var WSAE_ArrRecLength = 5; // Win Services Alert Log Record function processAlertWinServicesRecord(LogRecStrg) { var WLRec = new Array(); WLRec = LogRecStrg.split("~"); // parse the Log Record var dob = new Date(); // get current d/t // Alert Group ID, Computer ID, Time Stamp if ( IsDisplayInLog(WLRec[1],WLRec[5],WLRec[4]) == false ) return; // Didn't pass filter test /* Check for duplicate by comparing versus Event ID array */ var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = WLRec[0]+"~"+WLRec[1]; // Event ID = ServicesLogID~AlertGroupID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } var CompID = WLRec[5]; // Computer ID // Save Win Services Log Record string in temporary store addElementToSelect(VA_ServEventStore,CompID); //+0 addElementToSelect(VA_ServEventStore,"WinServicesLog~"+LogRecStrg); /* Lookup Computer Name and Description */ if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { // if read not already in progress, if ( !goCheckServEventStore() ) { goCheckUserEventStore(); } } } /* Process the Unsolicited Event Log Alert Event */ function processUnsolicitedEventLogAlertEvent(AGID_ELDID,Tflg) { var warr = new Array(); warr = AGID_ELDID.split("~"); // split out Alert Grp ID and LogData Record ID if ( CheckAlertFilter(warr[0],Tflg) == false ) return; // if not in filter top.Rstatus.Pstat("EventLogWatch Alert Broadcast Received",true); /* Initiate Read of EventLog Data */ if ( RpmCC_VA.GetEventLogDataRecord(warr[1]) ) { top.Rstatus.Pstat("Unable to start the EventLog Data Record LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag } } // Event Log Alert Log Record function processAlertEventLogRecord(LogRecStrg) { var SLRec = new Array(); SLRec = LogRecStrg.split("~"); // parse the Log Record // Alert Group ID, Computer ID, Time Stamp if ( IsDisplayInLog(SLRec[3],SLRec[2],SLRec[5]) == false ) return; // Didn't pass filter test /* Check for duplicate by comparing versus Event ID array */ var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = SLRec[0]+"~"+SLRec[3]; // Event ID = EventLog MonitorID~AlertGroupID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } var CompID = SLRec[2]; // Computer ID // Save Event Log Record string in temporary store addElementToSelect(VA_ServEventStore,CompID); //+0 addElementToSelect(VA_ServEventStore,"EventLog~"+LogRecStrg); /* Lookup Computer Name and Description */ if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { // if read not already in progress, if ( !goCheckServEventStore() ) { goCheckUserEventStore(); } } } /* Process the Unsolicited SNMP Trap Alert Event */ function processUnsolicitedSNMPAlertEvent(AGID_STLID,Tflg) { var warr = new Array(); warr = AGID_STLID.split("~"); // split out Alert Grp ID and Trap Log Record ID if ( CheckAlertFilter(warr[0],Tflg) == false ) return; // if not in filter top.Rstatus.Pstat("SNMPTrapWatch Alert Broadcast Received",true); /* Initiate Read of SNMP Trap Data */ if ( RpmCC_VA.GetSnmpTrapLogRecord(warr[1]) ) { top.Rstatus.Pstat("Unable to start the SNMP Trap Log Data Record LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag } } // SNMP Trap Alert Log Record function processAlertSNMPRecord(LogRecStrg) { var SLRec = new Array(); SLRec = LogRecStrg.split("~"); // parse the Log Record var TMix = getTrapMonitorIX(SLRec[6]); // get Trap Monitor Storage Index if ( TMix < 0 ) return; // not found var dob = new Date(); // get current d/t var lst = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear(); var chrs = (dob.getHours() < 10) ? "0"+dob.getHours() : dob.getHours(); lst += " " + chrs + ":" + dob.getMinutes() + ":" + dob.getSeconds(); SLRec[5]=lst; //sunstitute time LogRecStrg = SLRec.join("~"); // Alert Group ID, Computer ID, Time Stamp if ( IsDisplayInLog(AC_TrapMonitorStore[TMix+2].text,AC_TrapMonitorStore[TMix+1].text,SLRec[5]) == false ) return; // Didn't pass filter test /* Check for duplicate by comparing versus Event ID array */ var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = SLRec[0]+"~"+SLRec[6]; // Event ID = TrapMonitorLogRecID~TrapMonitorID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } var CompID = AC_TrapMonitorStore[TMix+1].text; // Computer ID // Save SNMP Trap Record string in temporary store addElementToSelect(VA_ServEventStore,CompID); //+0 var lrs = LogRecStrg +"~"+AC_TrapMonitorStore[TMix+2].text+"~"+AC_TrapMonitorStore[TMix+1].text; addElementToSelect(VA_ServEventStore,"SNMPTrap~"+lrs); /* Lookup Computer Name and Description */ if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { // if read not already in progress, if ( !goCheckServEventStore() ) { goCheckUserEventStore(); } } } // Find Index to TrapMonitor Record Store based on TrapMonitor ID function getTrapMonitorIX(TMid) { for ( var i=0; i<AC_TrapMonitorStore.length; i+=TrapMonRecSize ) { if ( AC_TrapMonitorStore[i].text == TMid) { break; } } // if found var retv = ( i <AC_TrapMonitorStore.length )? i : -1; return retv; } /* Process the Unsolicited Service Alert Event */ var MRLogRecID = null; function processUnsolicitedServiceAlertEvent(AGID_LFID,Tflg) { var warr = new Array(); warr = AGID_LFID.split("~"); // split out Alert Grp ID and Log Record ID if ( CheckAlertFilter(warr[0],Tflg) == false ) return; // if not in filter top.Rstatus.Pstat("ServerWatch Alert Broadcast Received",true); /* Initiate Read of Event Table for Events Matching Criteria */ if ( RpmCC_VA.ServicesLogGetRecord(warr[1]) ) { top.Rstatus.Pstat("Unable to start the Services Log LOOKUP request",true); } else { MRLogRecID = warr[1]; // save Log Record ID VA_CommBusy = 1; // set Comm busy flag } } var ServEventRecLth = 2; // Services Alert Log Record function processAlertServicesLogRecord(LogRecStrg) { var SLRec = new Array(); SLRec = LogRecStrg.split("~"); // parse the Log Record // Alert Group ID, Computer ID Time Stamp if ( IsDisplayInLog(SLRec[2],SLRec[3],SLRec[5]) == false ) return; // Didn't pass filter test /* Check for duplicate by comparing versus Event ID array */ var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = SLRec[0]+"~"+SLRec[2]; // Event ID = ServiceRecID~AlertGroupID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } var CompID = SLRec[3]; // Computer ID // Save Event Log Record string in temporary store addElementToSelect(VA_ServEventStore,CompID); //+0 addElementToSelect(VA_ServEventStore,LogRecStrg); /* Lookup Computer Name and Description */ if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { // if read not already in progress, if ( !goCheckServEventStore() ) { goCheckUserEventStore(); } } } var curServAlertCompNme = null; var curServAlertCompDesc = null; function processAlertServicesComputerLookup(CID,CNME,CDESC) { curServAlertCompNme = CNME; // save Computer Name and Description curServAlertCompDesc = CDESC; goProcessLogRec(CID); // go process log record if ( !goCheckServEventStore() ) { goCheckUserEventStore(); } } function goCheckServEventStore() { var CompID = null; while ( VA_ServEventStore.length > 0 ) { CompID = VA_ServEventStore.options[0].text; // get next entry if ( getCompNameDesc(CompID) ) { // see if Computer already in local store if ( !goProcessLogRec(CompID) ) // yes-go process immediately break; } else if ( !RpmCC_VA.ComputerLookupByIDArray(CompID) ) { ALupMode = "AlertEvent"; VA_CommBusy = 1; // set Comm busy flag return true; // exit now } } ALupMode = ""; // reset return false; } function goProcessLogRec(CmpID) { // process log record /* Get Log Record from Store based on Computer ID */ for (var i=0; i < VA_ServEventStore.length; i+=ServEventRecLth) { if ( VA_ServEventStore.options[i].text == CmpID ) { outputLogEvent(null,VA_ServEventStore.options[i+1].text); // go process for ( var j=0; j<ServEventRecLth; j++ ) { // remove from temporary store VA_ServEventStore.remove(i); } return true; } } return false; } /* Process the Unsolicited User Alert Event */ var UserEventRecLth = 2; function processUnsolicitedUserAlertEvent(AGID_CID,Tflg) { var warr = new Array(); warr = AGID_CID.split("~"); // split out Alert Grp ID and Computer ID if ( CheckAlertFilter(warr[0],Tflg) == false ) { return; // if not in filter } top.Rstatus.Pstat("User Alert Broadcast Received",true); var CmpID = warr[1]; // Computer ID // Save User Event info in temporary store addElementToSelect(VA_UserEventStore,CmpID); // Comp ID addElementToSelect(VA_UserEventStore,warr[0]); // Alert GroupID if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { // if read not already in progress, if ( !goCheckUserEventStore() ) { goCheckServEventStore(); } } } function goCheckUserEventStore() { var rstat = false; while ( VA_UserEventStore.length > 0 ) { var CompID = VA_UserEventStore.options[0].text; // get next entry CID for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) { if ( CompID == AC_CompStoreArr[i] ) { // if in Store // get Computer Name and Description & output Log entry rstat = goProcessUserRec(CompID,AC_CompStoreArr[i+1],AC_CompStoreArr[i+2]); break; } } if ( i < AC_CompStoreArr.length ) { // if Comp ID found if ( rstat == true ) { continue; // check next } } else if ( !RpmCC_VA.ComputerLookupByIDArray(CompID) ) { ALupMode = "UserAlertEvent"; VA_CommBusy = 1; // set Comm busy flag return true; // exit now } } ALupMode = ""; // reset return false; } function processAlertUserComputerLookup(CID,CNME,CDESC) { goProcessUserRec(CID,CNME,CDESC); // go process event record if ( !goCheckUserEventStore() ) goCheckServEventStore(); } function goProcessUserRec(CmpID,CNME,CDESC) { // process User Alert record /* Get Log Record from Store based on Computer ID */ for (var i=0; i < VA_UserEventStore.length; i+=UserEventRecLth) { if ( VA_UserEventStore.options[i].text == CmpID ) { var olP = "UserAlert~"+VA_UserEventStore.options[i+1].text+"~"+CNME; olP += "~"+CDESC; outputLogEvent(null,olP); for ( var j=0; j<UserEventRecLth; j++ ) { // remove from temporary store VA_UserEventStore.remove(i); } return true; } } return false; } /* Check Filter for Eligible Alert */ function CheckAlertFilter(Agid,Tflg) { if ( Tflg == null ) { // set serach time for Event if not specified Tflg = ELogParams.logtime; if ( Tflg == "0" ) { // get Start Time for Client Tflg = top.banner.getLogStartTime(); ELogParams.logtime = Tflg; } } return IsDisplayInLog(Agid,null,Tflg);// check if in Filter } /* Process Clear Log button click */ function processClearButton() { ELogWin.innerHTML = ELogWinInit; // clear log /* Redefine Log Time based on Current Time */ var dob = new Date(); // get current d/t var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear(); lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds(); ELogParams.logtime = lt; // update the D/T stamp ELBgFlg = 0; //ClearButton.className = "BoxButtonD"; // disable button ClearButton.disabled = "disabled"; // disable button //StatusPrintButton.className = "BoxButtonD"; // disable button StatusPrintButton.disabled = "disabled"; // disable button } /* Process Configure Button Click */ function processConfigureButton() { if ( ALupMode == "AlertEvent" ) return; // ignore, currently doing Computer Lookup //ConfigButton.className = "BoxButtonD"; // disable button ConfigButton.disabled = "disabled"; // disable button PopUpDiv.style.display=""; AL_AlertSel.style.display = ""; if ( AL_AlertSel.length > 0 ) { AL_AlertSel.options[0].selected = "selected"; populateInput(0); } } function processDoneButton() { ALupMode = ""; // reset RpmCC_VA.RegSetKey(top.banner.ServerID+"LogFilterSave",ELogViewCur.innerHTML) closeCalendarFields();// close calendar fields if opened AL_AlertSel.style.display = "none"; PopUpDiv.style.display = "none"; //ConfigButton.className = "BoxButton"; // enable button ConfigButton.disabled = ""; // enable button top.Rstatus.Pstat(""); } /* Process ViewCurrent and Hide Current Log Filter Button Clicks */ function processViewCurrentButton() { ELogWin.style.height=ELogWinSplitH; vct = ELogViewCurLine.innerHTML; ELogViewCurLine.style.display=""; ELogViewCurLine.innerHTML = vct; //ViewCurrentButton.className = "BoxButtonD"; // disable button ViewCurrentButton.disabled = "disabled"; // disable button ELogViewCurLine.scrollIntoView(false); } function processHideCurrentButton() { ELogWin.style.height=ELogWinFullH; ELogViewCurLine.style.display="none"; //ViewCurrentButton.className = "BoxButton"; // enable button ViewCurrentButton.disabled = ""; // disable button } /* Process Update Log Filter and Window */ function processUpdateLogFilter(FilOp) { if ( FilOp == "add" ) { // Add an entry to the Current View FOps = "<div agrpid='" + CurAlertID + "' onclick='processLogFilterClick(this)' id='lf"; FOps += CurAlertID + "' style='background-color:white; cursor:hand'>" } else { // otherwise, Update an entry in the Current View Fo = document.all["lf"+CurAlertID]; Fo.innerHTML = ""; // clear entry FOps = ""; } /* Accomodate Names Larger than Field Size */ if (CurrentAlertType == "C") { Fcon = "Counter: " + CurCntrName + " : " + CurObjName; } else if (CurrentAlertType == "S") { Fcon ="IP Service: " + curServName; } else if (CurrentAlertType == "E") { Fcon = "EventLog: " + CurELName; } else if (CurrentAlertType == "T") { Fcon = "SNMPTrap"; } else if (CurrentAlertType == "W") { Fcon = "WinServices"; } else if (CurrentAlertType == "F") { Fcon = "File"; } else if (CurrentAlertType == "L") { Fcon = "SYSLOG"; } else if (CurrentAlertType == "P") { Fcon = "Process"; } else { Fcon = "User: Alert"; } if ( Fcon.length > 47 ) { // Object : Name FconT = Fcon + " / "; // set for display in the title Fcon = Fcon.substring(0,46) + "..."; } else { FconT = ""; } FconDesc = (CurrentAlertType == "C") ? CurCntrDesc : ""; /* Output Parameters */ FOps += "<table border='0' cellpadding='0' cellSpacing='1' width='500'>"; FOps += "<tr><td width='50%' align='left' class='optext' style='cursor:hand' title='" + CurAlertDesc + "'>"; FOps += CurAlertName + "</td>"; FOps += "<td width='50%' align='left' class='optext' style='cursor:hand' title='" + FconT + FconDesc + "'>"; FOps += Fcon + "</td>"; FOps += "</tr></table>"; if ( FilOp == "add" ) { FOps += "</div>"; ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : ""; ELogViewCur.insertAdjacentHTML("beforeEnd",FOps); } else { Fo.insertAdjacentHTML("beforeEnd",FOps); } } /* Process Click on an Entry in the Log Filter Current View */ var CurLflSelected = null; function processLogFilterClick(LFobj) { if ( CurLflSelected != null ) { document.all[CurLflSelected].style.backgroundColor = "white"; } if ( CurLflSelected == LFobj.id ) { // if same line //VC_DeleteButton.className = "BoxButtonD"; VC_DeleteButton.disabled = "disabled"; CurLflSelected = null; } else { CurLflSelected = LFobj.id; LFobj.style.backgroundColor = "scrollbar"; //VC_DeleteButton.className = "BoxButton"; VC_DeleteButton.disabled = ""; } } /* Process Delete Button Click */ function processDeleteEntryButton() { if ( CurLflSelected != null ) { // if an entry is highlited // delete highlited entry CAid = document.all[CurLflSelected].agrpid; // get AlertGrp ID document.all[CurLflSelected].outerText = ""; // clear entry CurLflSelected = null; // reset to no selected entry //VC_DeleteButton.className = "BoxButtonD"; // disable Delete button VC_DeleteButton.disabled = "disabled"; // disable Delete button // clear entry from the Filter Store FilObj = VA_FilterStore; // Filter Store if ( getFilterEntry(CAid) == null ) // Find index to the entry in the Store return; // if entry not found for ( var i=0; i<FilterRecSize; i++ ) { // remove entry from the Store FilObj.remove(FilterSelectIdx); } --FilterRecCnt; // adjust count ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : ""; // update save in Registry RpmCC_VA.RegSetKey(top.banner.ServerID+"LogFilterSave",ELogViewCur.innerHTML) } } /* Process Show Event Button Click */ var FilterRecSize = 7; // Filter Record size function processApplyButton() { var Scid = ""; // Computer ID Array if ( CurrentAlertType == "C" || CurrentAlertType == "S" || CurrentAlertType == "W" || CurrentAlertType == "L" || CurrentAlertType == "E" || CurrentAlertType == "T" || CurrentAlertType == "F" || CurrentAlertType == "P") { // if Service, Event Log, Win Servcie or Counter type /* Create an array of selected computers */ for ( var i=0, j=0; i<CountOfComps; i++ ) { // Test each computer for Checked if ( document.all["cmpa_"+i].checked == "1" ) { if ( j > 0) { Scid += ","; // array id separator } Scid += document.all["cmpa_"+i].cmpid; // save Computer ID ++j; } } if ( j == 0 ) { CurLflSelected = "lf"+CurAlertID; processDeleteEntryButton(); return; } } // if unchecked User Alert else if ( CurrentAlertType == "U" && usralt0.checked == "0" ) { CurLflSelected = "lf"+CurAlertID; processDeleteEntryButton(); return; } var nd = new Array(); ASdt = VA_StartDate.value; // Get Start Date AEdt = VA_StopDate.value; // Get End Date if ( ASdt.length == 0 || AEdt.length == 0) { top.Rstatus.Pstat("Please enter valid Start and Stop Date",true); VA_StartDate.focus(); return; } nd = ASdt.split(" "); ASdt = nd[3] + " " + "0:0:0"; var Dob = new Date(ASdt); // Date object Sms = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0 nd = AEdt.split(" "); AEdt = nd[3] + " " + "23:59:59"; Dob = new Date(AEdt); Ems = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0 /* See if entry already exists in the filter */ FilObj = VA_FilterStore; // Filter Store if ( getFilterEntry(CurAlertID) != null ) { // if entry already in the filter FilOp = "repl"; // Filter Update Op is Replace i = FilterSelectIdx; // index to found entry FilObj.options[i+1].text = Scid; FilObj.options[i+2].text = ASdt; FilObj.options[i+3].text = Sms; FilObj.options[i+4].text = AEdt; FilObj.options[i+5].text = Ems; FilObj.options[i+6].text = curServName; // current Service Name if Service } else { // otherwise, not yet in the Filter Store FilOp = "add"; // Filter Update Op is Add addElementToSelect(FilObj,CurAlertID); addElementToSelect(FilObj,Scid); addElementToSelect(FilObj,ASdt); addElementToSelect(FilObj,Sms); addElementToSelect(FilObj,AEdt); addElementToSelect(FilObj,Ems); addElementToSelect(FilObj,curServName); // current Service Name if Service ++FilterRecCnt; // bump record count } /* Update Log Filter Window */ processUpdateLogFilter(FilOp); /* Initiate Read of Event Table for Events Matching Criteria if Counter */ if ( CurrentAlertType == "C" ) { if ( RpmCC_VA.AlertEventsLookup(CurAlertID,Scid,ASdt,AEdt) ) { top.Rstatus.Pstat("Unable to start the Alert Event LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag top.Rstatus.Pstat("One moment while Alert Event LOOKUP request completes"); } } if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") { AL_AlertSel.focus(); // restore focus } } /* Search Filter Store for Given Alert Group ID */ function getFilterEntry(AGID) { FilObj = VA_FilterStore; // Filter Store FilMax = FilterRecCnt * FilterRecSize; for ( i=0; i<FilMax; i+=FilterRecSize ) { if ( AGID == FilObj.options[i].text ) { FilterSelectIdx = i; // save index return i; } } return null; } // Validate Alert Filter function processValidateFilter() { if ( ValidateFilter == false ) return; // exit if not needed ValidateFilter = false; // reset for ( var i=0; i<VA_FilterStore.length; i+=FilterRecSize ) { // Check for valid Alert Group ID and that End D/T is greater than current D/T if ( !IsValidAlertGroup(VA_FilterStore.options[i].text) ) { // remove entry from Filter display document.all["lf"+VA_FilterStore.options[i].text].outerText = ""; // remove entry from the Store for ( var j=0; j<FilterRecSize; j++ ) { VA_FilterStore.remove(i); } --FilterRecCnt; // adjust count i -= FilterRecSize; // adjust index for just deleted entry } } ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : ""; // update save in Registry RpmCC_VA.RegSetKey(top.banner.ServerID+"LogFilterSave",ELogViewCur.innerHTML) } /* Check if Valid Alert Group ID */ function IsValidAlertGroup(UID) { for (var i=0; i < AlertStoreArr.length; i+=AlertRecLength) { if ( AlertStoreArr[i+1] == UID ) { return true; } } return false; } /* Search Filter and Determine If Event Should Be Displayed */ function IsDisplayInLog(AGID,CID,TS) { // check if entry in Filter for Alert Group ID if ( VA_FilterStore.length == 0 ) { return true; // defaultto show everthing if no filter } if ( getFilterEntry(AGID) == null ) return false; // not in Filter // check if Computer ID in Array of Found Filter entry if ( CID != null ) { var CaR = new Array(); FilObj = VA_FilterStore; // Filter Store CaR = FilObj.options[FilterSelectIdx+1].text.split(","); // Comp ID array for ( var i=0; i<CaR.length; ++i ) { if ( CID == CaR[i] ) // if match on Comp ID break; } if ( i>=CaR.length ) return false; // not in Filter } // Specified parameters match a Filter entry return true; } var EventRecCount = 0; // Count of temporary Event records var EventRecLength = 18; // Event record length var EventSelectIdx = 0; function AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme) { StoreObj = VA_EventStore; // Storage if ( IsEventExist(EvID) == false ) { // if not received yet addElementToSelect(StoreObj,EvID); //+0 addElementToSelect(StoreObj,EvTimStmp); addElementToSelect(StoreObj,EvCntNme); addElementToSelect(StoreObj,EvObjNme); addElementToSelect(StoreObj,EvCmpNme); addElementToSelect(StoreObj,EvValue); //+5 addElementToSelect(StoreObj,EvEmNotify); addElementToSelect(StoreObj,EvPhNotify); addElementToSelect(StoreObj,EvProNotify); addElementToSelect(StoreObj,EvPgNotify); //+9 addElementToSelect(StoreObj,EvThresh); addElementToSelect(StoreObj,EvOver); addElementToSelect(StoreObj,EvDur); //+12 /* allocate space for Part 2 */ addElementToSelect(StoreObj,""); //+13 addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); //+17 } else { // already received Part 2, update Part 1 ESix = EventSelectIdx * EventRecLength; StoreObj.options[ESix+0].text = EvID; StoreObj.options[ESix+1].text = EvTimStmp; StoreObj.options[ESix+2].text = EvCntNme; StoreObj.options[ESix+3].text = EvObjNme; StoreObj.options[ESix+4].text = EvCmpNme; StoreObj.options[ESix+5].text = EvValue; StoreObj.options[ESix+6].text = EvEmNotify; StoreObj.options[ESix+7].text = EvPhNotify; StoreObj.options[ESix+8].text = EvProNotify; StoreObj.options[ESix+9].text = EvPgNotify; //+9 StoreObj.options[ESix+10].text = EvThresh; StoreObj.options[ESix+11].text = EvOver; StoreObj.options[ESix+12].text = EvDur; //+12 outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store StoreObj.remove(ESix); } } } function AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver) { StoreObj = VA_EventStore; // Storage if ( IsEventExist(EvID) == false ) { // if not received yet // allocate space for Part 1 addElementToSelect(StoreObj,EvID); //+0 addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); //+5 addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); //+9 addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); //+12 /* save Part 2 */ addElementToSelect(StoreObj,EvCmpID); //+13 addElementToSelect(StoreObj,EvAlGrpID); addElementToSelect(StoreObj,EvObjDesc); addElementToSelect(StoreObj,EvCntrDesc); addElementToSelect(StoreObj,EvCmpDesc); //+17 } else { // already received Part 1, update Part 2 ESix = EventSelectIdx * EventRecLength; StoreObj.options[ESix+13].text = EvCmpID; StoreObj.options[ESix+14].text = EvAlGrpID; StoreObj.options[ESix+15].text = EvObjDesc; StoreObj.options[ESix+16].text = EvCntrDesc; StoreObj.options[ESix+17].text = EvCmpDesc; outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store StoreObj.remove(ESix); } } } var LogEventBsy = false; /* Check if Event Passes Filter Test and if so, Output to Log Window */ function outputLogEvent(ESObj,ESx) { if ( ESObj == null ) { // Service Alert or User Alert Event var warr = new Array(); var SLRec = new Array(); var warr1 = new Array(); SLRec = ESx.split("~"); // parse the Log Record if ( SLRec[0] == "EventLog" ) { // process EventLog Alert EGid = SLRec[4]; // Alert Group ID ECmn = curServAlertCompNme; // Computer Name ECmd = curServAlertCompDesc; // Cmp Desc EOn = EOvr = ""; // Obj Name, Over warr = SLRec[6].split("/"); // Time Stamp warr[0] = ""+parseInt(warr[0],10); warr[1] = ""+parseInt(warr[1],10); ETs = warr.join("/"); Eid = SLRec[1]+"~"+SLRec[4]; // Event ID Ev = SLRec[11]; // Status Code = Event ID // make sure complete message has no single quote characters warr.length =0; warr = SLRec[12].split("'"); SLRec[12] = warr.join("`"); var darr = new Array(); darr = SLRec[12].split("\x0d\x0a\x0a\x0d\x0a\x0a"); SLRec[12] = darr.join("\x0a"); darr = SLRec[12].split("\x0d\x0a\x0a"); SLRec[12] = darr.join("\x0a"); AEV = "EvSrc: "+SLRec[9]+"; EvCat: "+SLRec[10]+"; EvDesc: "+SLRec[12]; // Status string= Source, Category, & Comp Message var EvLTyp = ""; if ( SLRec[8] == "1" ) { EvLTyp = "Error"; } else if ( SLRec[8] == "2" ) { EvLTyp = "Warning"; } else if ( SLRec[8] == "4" ) { EvLTyp = "Information"; } else if ( SLRec[8] == "8" ) { EvLTyp = "Security"; } ECON = ECn = "EvLog "+SLRec[7]+" / "+EvLTyp; // Event Log Name & Type ECONT = ""; } else if ( SLRec[0] == "ProcessCheckLog" ) { // process Process Check Alert EGid = SLRec[4]; // Alert Group ID ECmn = curServAlertCompNme; // Computer Name ECmd = curServAlertCompDesc; // Cmp Desc EOn = EOvr = ""; // Obj Name, Over warr = SLRec[6].split("/"); // Time Stamp warr[0] = ""+parseInt(warr[0],10); warr[1] = ""+parseInt(warr[1],10); ETs = warr.join("/"); Eid = SLRec[1]+"~"+SLRec[4]; // Event ID Ev = SLRec[12]; // Status Code var pPID = "", pDuration = ""; if ( SLRec[18] != "" ) { var prarr = new Array(); prarr = SLRec[18].split("[]"); pPID = prarr[0]; pDuration = prarr[1]; } AEV = GetProcessCheckStatus(SLRec[12]); if ( pPID != "" ) { AEV += "; PID="+pPID; } if ( pDuration != "" ) { AEV += "; Duration="+pDuration; } AEV += "; CPU%= "+SLRec[7]+"; Memory= "+SLRec[8]; AEV += "KB; PPool= "+SLRec[9]+"KB; NPPool= "+SLRec[10]+"KB; PFile= "+SLRec[11]+"KB ;"; AEV += "Thresholds: CPU%= "+SLRec[13]+"; Memory= "+SLRec[14]; AEV += "KB; PPool= "+SLRec[15]+"KB; NPPool= "+SLRec[16]+"KB; PFile= "+SLRec[17]+"KB"; ECON = ECn = "ProcessWatch- "+ SLRec[5] ; if ( ECON.length > 27 ) { ECONT = ECON; // set for display in the title ECON = ECON.substring(0,27) + "..."; } else { ECONT = ""; } } else if ( SLRec[0] == "FileCheckLog" ) { // process File Check Alert EGid = SLRec[4]; // Alert Group ID ECmn = curServAlertCompNme; // Computer Name ECmd = curServAlertCompDesc; // Cmp Desc EOn = EOvr = ""; // Obj Name, Over warr = SLRec[10].split("/"); // Time Stamp warr[0] = ""+parseInt(warr[0],10); warr[1] = ""+parseInt(warr[1],10); ETs = warr.join("/"); Eid = SLRec[1]+"~"+SLRec[4]; // Event ID Ev = SLRec[8]; // Status Code AEV = GetFileCheckStatus(SLRec[8]) + " FileSize="+SLRec[6]+"KB; SearchString="+SLRec[7]+"; FileD/T="+SLRec[9]; ECON = ECn = "FileWatch- "+ SLRec[5] ; if ( ECON.length > 27 ) { ECONT = ECON; // set for display in the title ECON = ECON.substring(0,27) + "..."; } else { ECONT = ""; } } else if ( SLRec[0] == "SyslogCheckLog" ) { // process Syslog Check Alert EGid = SLRec[4]; // Alert Group ID ECmn = curServAlertCompNme; // Computer Name ECmd = curServAlertCompDesc; // Cmp Desc EOn = EOvr = ""; // Obj Name, Over warr = SLRec[10].split("/"); // Time Stamp warr[0] = ""+parseInt(warr[0],10); warr[1] = ""+parseInt(warr[1],10); ETs = warr.join("/"); Eid = SLRec[1]+"~"+SLRec[4]; // Event ID Ev = SLRec[5]+" / "+SLRec[6]; // Status Code warr.length =0; warr = SLRec[9].split("'"); SLRec[9] = warr.join("`"); AEV = "Facility="+GetFacility(SLRec[5])+"; Severity="+GetSeverity(SLRec[6])+"; Message="+SLRec[9]; ECON = ECn = "SYSLOG- "+ SLRec[8] ; if ( ECON.length > 27 ) { ECONT = ECON; // set for display in the title ECON = ECON.substring(0,27) + "..."; } else { ECONT = ""; } } else if ( SLRec[0] == "WinServicesLog" ) { // process Win Services Alert EGid = SLRec[2]; // Alert Group ID ECmn = curServAlertCompNme; // Computer Name ECmd = curServAlertCompDesc; // Cmp Desc EOn = EOvr = ""; // Obj Name, Over warr = SLRec[5].split("/"); // Time Stamp warr[0] = ""+parseInt(warr[0],10); warr[1] = ""+parseInt(warr[1],10); ETs = warr.join("/"); Eid = SLRec[1]+"~"+SLRec[2]; // Event ID Ev = SLRec[3]; // Status Code if ( Ev == "0" ) { AEV = "Notified Only"; } else if ( Ev == "1" ) { AEV = "Service Restarted"; } else { AEV = SLRec[4]; // info } var WSAix = (parseInt(SLRec[7],10)-1) * WinServicesArrEntrySz; // get index to Service Array entry ECON = ECn = "WinService- "+ WinServicesArr[WSAix+2] + " ("+ WinServicesArr[WSAix+1] +")"; if ( ECON.length > 27 ) { ECONT = ECON; // set for display in the title ECON = ECON.substring(0,27) + "..."; } else { ECONT = ""; } } else if ( SLRec[0] == "SNMPTrap" ) { // process SNMPTrap Alert var rl = SLRec.length EGid = SLRec[rl-2]; // Alert Group ID ECmn = curServAlertCompNme; // Computer Name ECmd = curServAlertCompDesc; // Cmp Desc EOn = EOvr = ""; // Obj Name, Over warr = SLRec[6].split("/"); // Time Stamp warr[0] = ""+parseInt(warr[0],10); warr[1] = ""+parseInt(warr[1],10); warr1 = warr[2].split(":"); warr1[1] = ( warr1[1].length > 1 ) ? warr1[1] : "0"+warr1[1]; warr1[2] = ( warr1[2].length > 1 ) ? warr1[2] : "0"+warr1[2]; warr[2] = warr1.join(":"); ETs = warr.join("/"); Eid = SLRec[1]+"~"+SLRec[7]; // Event ID Ev = SLRec[8]; // Status Code = VB Count var VarBind = " "; if ( SLRec.length > 13 ) { // if Variable Binding info var VBCount = parseInt( SLRec[11], 10 ); for ( var i=0; i<VBCount; i++ ) { VarBind += SLRec[12+i+i]; VarBind += ", "+SLRec[13+i+i]+"; "; } } AEV = "From Addr: "+SLRec[3]+"; NotifyOID: "+SLRec[2]+"; UpTime: "+SLRec[4]+"; VariableBindings: "+VarBind; // Status string ECON = ECn = "SNMP Trap-"+getOIDName(SLRec[2]); // Alert Name if ( ECON.length > 30 ) { ECONT = ECON; // set for display in the title ECON = ECON.substring(0,30) + "..."; } else { ECONT = ""; } } else if ( SLRec[0] == "UserAlert" ) { // process User Alert EGid = SLRec[1]; // Alert Group ID ECmn = SLRec[2]; // Computer Name ECmd = SLRec[3]; // Cmp Desc EOn = EOvr = ""; // Obj Name, Over var dob = new Date(); // get current d/t var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear(); var chrs = ""+dob.getHours(); // current hours var cmin = ""+dob.getMinutes(); // current minutes var csec = ""+dob.getSeconds(); // current seconds lt += " " + ((chrs.length == 1) ? "0"+chrs : chrs) + ":"; lt += ((cmin.length == 1) ? "0"+cmin : cmin)+":"; lt += ((csec.length == 1) ? "0"+csec : csec); ETs = lt; // D/T stamp Eid = SLRec[1]+"~"+SLRec[2]; // Event ID Ev = ""; // Status Code AEV = ""; // Status string ECON = ECn = "User Alert"; // Service Name ECONT = ""; } else { // Service Alert Eid = SLRec[0]+"~"+SLRec[2]; // Event ID = ServiceRecID~AlertGroupID EGid = SLRec[2]; // Alert Group ID ECmn = curServAlertCompNme; // Computer Name ECmd = curServAlertCompDesc; // Cmp Desc warr = SLRec[5].split("/"); // Time Stamp warr[0] = ""+parseInt(warr[0],10); warr[1] = ""+parseInt(warr[1],10); ETs = warr.join("/"); EOn = EOvr = ""; // Obj Name, Over Ev = SLRec[7]; // Status Code // make sure complete message has no single quote characters warr.length =0; warr = SLRec[6].split("'"); SLRec[6] = warr.join("`"); AEV = SLRec[6]; // Status string if ( SLRec[4] == "AGENT" ) { if ( AEV.indexOf("Page File") != -1 ) { Ev = "2"; } else if ( AEV.indexOf("Logical") != -1 ) { Ev = "3"; } } ECON = ECn = (SLRec[4] == "SQLCONNECT") ? "SQL" : SLRec[4]; // Service Name ECONT = ""; } } else { EGid = ESObj.options[ESx+14].text; // Alert Group ID CID = ESObj.options[ESx+13].text; // Computer ID ETs = ESObj.options[ESx+1].text; // Time Stamp if ( IsDisplayInLog(EGid,CID,ETs) == false ) return; // Didn't pass filter test /* Check for duplicate by comparing versus Event ID array */ var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = StoreObj.options[ESx].text; // Event ID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } ECn = StoreObj.options[ESx+2].text; // Counter Name EOn = StoreObj.options[ESx+3].text; // Object Name ECmn = StoreObj.options[ESx+4].text; // Computer Name Ev = StoreObj.options[ESx+5].text; // Event Value EOd = StoreObj.options[ESx+15].text; // Obj Desc ECd = StoreObj.options[ESx+16].text; // Cntr Desc ECmd = StoreObj.options[ESx+17].text; // Cmp Desc EOvr = StoreObj.options[ESx+11].text; // Over AEV = "Threshold: " + StoreObj.options[ESx+10].text + "; Duration: " + StoreObj.options[ESix+12].text; /* Accomodate Names Larger than Field Size */ ECON = ECn; // counter name if ( ECON.length > 30 ) { ECONT = ECON + " / "; // set for display in the title ECON = ECON.substring(0,30) + "..."; } else { ECONT = ""; } ECONT += "Object Name : Desc = " + EOn + " : " + EOd; ELogParams.logtime = ETs; // update the D/T stamp } AEagd = AEad = AEsub = AEpn = PGnbr = PGtext = BPnbr = BPtext = ""; ACS = ""; // Action string ACd = ""; // Action description if ( (EAgn = getAlertNameSpecial(EGid)) != "" ) { // Alert Group Name var aix = AlertSelectIdx * AlertRecLength; AEad = AlertStoreArr[aix+15]; // Email Address var est = AlertStoreArr[aix+16]; var estarr = new Array(); estarr = est.split("[+]"); AEsub = estarr[0]; // Email Subject AEpn = AlertStoreArr[aix+12]; // Program Name PGnbr = AlertStoreArr[aix+18]; // AlphaPage Number PGtext = AlertStoreArr[aix+19]; // AlphaPage TexttoSend BPnbr = AlertStoreArr[aix+21]; // Beeper Nmbr BPtext = AlertStoreArr[aix+22]; // Beeper Texttosend AEagd = AlertStoreArr[aix+2]; // Alert Group Desc if (AlertStoreArr[aix+14] == "1") { // EmailNotify? ACS += "Email Sent; "; ACd += "EmailAddress: " + AEad + "; EmailSubject: " + AEsub + "; "; } if (AlertStoreArr[aix+11] == "1") { // Program Execution? ACd += "Program Run At " if ( AEpn.charAt(0) == ">" ) { // execute remotely? ACd += "Monitored Server/Computer"; AEpn = AEpn.substring(1,AEpn.length); // strip off ">" if ( AEpn == '"RESTART"' ) { AEpn = "Monitored Server/Computer Restarted"; ACS += "Computer Rebooted; " } else { ACS += "Program Run; "; } } else { ACS += "Program Run; "; ACd += "MonitorIT Server"; } ACd += "; ProgramName: " + AEpn +"; ";; } if (AlertStoreArr[aix+17] == "1") { // AlphaPager? ACS += "Alpha Pager Called; "; ACd += "PagerNumber: "+ PGnbr + "; PagerText: "+ PGtext +"; "; } if (AlertStoreArr[aix+20] == "1") { // Beeper? ACS += "Beeper Called " ACd += "BeeperNumber: "+ BPnbr + "; BeeperText: "+ BPtext +"; "; } if ( ESObj == null ) { if ( SLRec[0] == "WinServicesLog" && Ev == "1" ) { ACS += "Service Restarted; "; } } } if ( ACS == "" ) { ACS = "No Actions Taken"; } processAlertAudioOut(); // process AudioAlert /* Accomodate Names Larger than Field Size */ if ( ECmn.length > 30 ) { // Computer Name ECmnT = ECmn + " / "; // set for display in the title ECmn = ECmn.substring(0,30) + "..."; } else { ECmnT = ""; } if ( ECmd.charAt(ECmd.length-1) == "." ) { ECmd = ECmd.substring(0,ECmd.length-1); } ECmnT += ECmd + "; Watch/Alert Name = " + EAgn; if ((ELBgFlg ^= 1) == 0) { FOps = "<div style='background-color:white'>"; } else { FOps = "<div style='background-color:e8e8e8'>"; } FOps += "<table border='0' cellpadding='0' cellSpacing='1' width='100%'"; if ( EOvr == "0") { // if Event over threshold FOps += " style='color:red'"; } FOps += "><tr>"; FOps += "<td width='170' colspan='1' align='left' class='optext' style='cursor:hand' title='" + ECmnT + "'>"; FOps += ECmn + "</td>"; FOps += "<td width='170' colspan='1' align='left' class='optext' style='cursor:hand' title='" + ECONT + "'>"; FOps += ECON + "</td>"; FOps += "<td width='106' colspan='1' align='left' class='optext'>"; FOps += ETs + "</td>"; FOps += "<td width='65' colspan='1' align='left' class='optext' style='cursor:hand' title='" + AEV + "' >"; FOps += Ev + "</td>"; FOps += "<td width='*' colspan='1' align='left' class='optext' style='cursor:hand' title='" + ACd + "'>"; FOps += ACS + "</td>" FOps += "</tr></table></div>"; ELogText.insertAdjacentHTML("afterBegin",FOps); //ELogWin.scrollIntoView(); ELogParams.logeventid += Eid + ","; // update the Event ID Array //ClearButton.className = "BoxButton"; // enable button ClearButton.disabled = ""; // enable button //StatusPrintButton.className = "BoxButton"; // enable button StatusPrintButton.disabled = ""; // enable button LogEventBsy = false; // set free } /* Get Alert Name from Store based on Alert ID */ function getAlertNameSpecial(UID) { AlertName = ""; for (i=0, j=0; i < AlertStoreArr.length; ++j, i+=AlertRecLength) { if ( AlertStoreArr[i+1] == UID ) { AlertName = AlertStoreArr[i]; AlertSelectIdx = j; break; } } return AlertName; } /* Get Event Name from Store based on Event ID */ function IsEventExist(EID) { ENobj = VA_EventStore; // get object for (var i=0, j=0; i < ENobj.length; ++j, i+=EventRecLength) { if ( ENobj.options[i].text == EID ) { EventSelectIdx = i; return true; } } return false; } /* Process DB Error in Alert Lookup Operation */ function processAlertEventOpComplete() { ATid = setTimeout("processCounterAlert()",1500); // Delay 1.5 secs then process } /* Process Populate Configure Edit Fields */ var Tops = ""; // output string var SBObj = null; // SelectBox Object for output var OCArray = new Array(); // ComputerID,ObjectID pair array var CkCArr = new Array(); // "Checked" Computers array var curServName = null; // Current Service Name var CTparm = "optext"; // Computer Text Color var CurrentAlertType = null; function populateInput(idx) { SetCursor("wait"); setSelectAll(false); // disable Select/UnselectAll buttons CurAlertName = AlertStoreArr[idx]; CurAlertID = AlertStoreArr[idx+1]; CurAlertDesc = AlertStoreArr[idx+2]; CkCArr.length = 0; // init checked computer array curServName = ""; // initialize CountOfComps = 0; // clear // If Service, preset Start and End D to today var dob = new Date(); // get current d/t var calt = AlertStoreArr[idx+10]; if ( calt == "" || calt == "SNMPTrap" || calt == "UserAlert" || calt == "EventLog" || calt == "WinService" || calt == "FileCheck" || calt == "SyslogCheck" || calt == "ProcessCheck") { // if Service, SNMP Trap, EventLog or User CurrentAlertType = "S"; // set Service type if ( AlertStoreArr[idx+8] == "01/01/1999 11:50:00" || AlertStoreArr[idx+8] == "1/1/1999 11:50:0" || calt == "UserAlert" ) { // if User AlertStoreArr[idx+10] = "UserAlert"; CurrentAlertType = "U"; // "User" type } else if ( AlertStoreArr[idx+8] == "01/01/1999 11:40:00" || AlertStoreArr[idx+8] == "1/1/1999 11:40:0" || calt == "EventLog" ) { AlertStoreArr[idx+10] = "EventLog"; CurrentAlertType = "E"; // "Event Log" type } else if ( AlertStoreArr[idx+8] == "01/01/1999 11:20:00" || AlertStoreArr[idx+8] == "1/1/1999 11:20:0" || calt == "SNMPTrap" ) { AlertStoreArr[idx+10] = "SNMPTrap"; CurrentAlertType = "T"; // "SNMP Trap" type } else if ( AlertStoreArr[idx+8] == "01/01/1999 11:10:00" || AlertStoreArr[idx+8] == "1/1/1999 11:10:0" || calt == "WinService" ) { AlertStoreArr[idx+10] = "WinService"; CurrentAlertType = "W"; // "Win Service" type } else if ( AlertStoreArr[idx+8] == "01/01/1999 11:00:00" || AlertStoreArr[idx+8] == "1/1/1999 11:0:0" || calt == "FileCheck" ) { AlertStoreArr[idx+10] = "FileCheck"; CurrentAlertType = "F"; // "File Check" type } else if ( AlertStoreArr[idx+8] == "01/01/1999 11:12:00" || AlertStoreArr[idx+8] == "1/1/1999 11:12:0" || calt == "ProcessCheck" ) { AlertStoreArr[idx+10] = "ProcessCheck"; CurrentAlertType = "P"; // "Process Check" type } else if ( AlertStoreArr[idx+8] == "01/01/1999 11:15:00" || AlertStoreArr[idx+8] == "1/1/1999 11:15:0" || calt == "SyslogCheck" ) { AlertStoreArr[idx+10] = "SyslogCheck"; CurrentAlertType = "L"; // "File Check" type } AlertStoreArr[idx+8] = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear() + " 0:0:0"; AlertStoreArr[idx+9] = "12/31/2030 23:59:59"; } else { // Counter type CurrentAlertType = "C"; // "Counter" Alert type if ( AlertStoreArr[idx+8] == "01/01/1999 11:59:00" || AlertStoreArr[idx+8] == "1/1/1999 11:59:0" ) { CTparm = "optextr"; } else { CTparm = "optext"; } } /* Check if Entry exists in the Filter */ FilObj = VA_FilterStore; // Filter Store if ( getFilterEntry(CurAlertID) != null ) { // if entry in the filter i = FilterSelectIdx; // index to found entry CkCArr = FilObj.options[i+1].text.split(","); // get checked CIDs msec = eval(FilObj.options[i+3].text); dob = new Date(msec); AlertStoreArr[idx+8] = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear() + " " + dob.getHours()+":"+dob.getMinutes()+":"+dob.getSeconds(); msec = eval(FilObj.options[i+5].text); dob = new Date(msec); AlertStoreArr[idx+9] = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear() + " " + dob.getHours()+":"+dob.getMinutes()+":"+dob.getSeconds(); } /* Determine Start D */ i = AlertStoreArr[idx+8]; Ia = i.split(" "); // get Start date and time var Ib = new Array(); Ib = Ia[0].split("/"); dob = new Date(Ib[2],(Ib[0]-1),Ib[1]); VA_StartDate.value = " " + dowArray[dob.getDay()] + " " + Ia[0]; // Date baseDay = dob.getDate(); // Set base date based on Start Date baseMonth = dob.getMonth(); baseYear = dob.getFullYear(); /* Determine Stop D */ i = AlertStoreArr[idx+9]; Ia = i.split(" "); // get Stop date and time Ib = Ia[0].split("/"); dob = new Date(Ib[2],(Ib[0]-1),Ib[1]); VA_StopDate.value = " " + dowArray[dob.getDay()] + " " + Ia[0]; // Date /* setup Object:Counter info for display */ SBObj = VA_Select; SBObj.innerHTML = ""; // clear current display // get Computers,Object,Counter to an Array OCArray = AlertStoreArr[idx+10].split(";"); if ( CurrentAlertType == "S" ) { // Service type var srvcarr = new Array(); /* Compute Array of Computer IDs */ CompIdLupArr = ""; // Computer Id Array for ( var i=0,j=0,srvcix; i<AC_ServicesStoreArr.length; i+=ServicesRecLength ) { if ( AC_ServicesStoreArr[i+1] == CurAlertID ) { srvcix = i; // save found index for typical entry if ( j > 0) { CompIdLupArr += ","; // array id separator } else { srvcarr = AC_ServicesStoreArr[i+3].split("~"); CTparm = ( srvcarr[11] == "1" ) ? "optextr" : "optext"; } CompIdLupArr += AC_ServicesStoreArr[i]; ++j; // bump computer count } } if ( (MaxCmpCount = j) == 0 ) { // if no computers, invalid AlertGroup top.Rstatus.Pstat("Error. Computer ID Array Empty and No Services Found",true); return; } curServName = AC_ServicesStoreArr[srvcix+2]; // current Service Name SBObj.style.overflow = ( j > 4 ) ? "scroll" : ""; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/sAdminServers.gif' width='16' height='16'></td>"; Tops += "<td width='*' class='optext'>" + curServName + "</td>"; Tops += "</tr></table>"; CountOfComps = 0; // initialize ALupMode = "EventPopIn"; processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions } else if ( CurrentAlertType == "U" ) { // if User Alert var wstrg = "Unchecked"; // default if ( getFilterEntry(CurAlertID) != null ) { // if entry in the filter wstrg = "Checked"; } Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr id='usralt0' checked='0' style='cursor:hand' onclick='procUsrAltClick(this)'><td width='5'> </td>"; Tops += "<td width='36' align='center'><img src='images/monitoritalert.gif' width='32' height='32' ></td>"; Tops += "<td width='13' align='center'><img id='usralt1' src='images/"+wstrg+".gif'"; Tops += " width='9' height='9'></td>"; Tops += "<td width='*' class='optext'> User Alert </td>"; Tops += "</tr></table>"; processPopulateInputOpComplete(); } else if ( CurrentAlertType == "E" ) { // if Event Log if ( RpmCC_VA.ELMonitorLookupByAlertGroup(CurAlertID) ) { ALupMode = ""; top.Rstatus.Pstat("Unable to start the EventLogWatch Computer LOOKUP request",true); return; } else { VA_CommBusy = 1; // set Comm busy flag CountOfCompsRcvd = 0; CompIdLupArr = ""; // Computer Id Array ALupMode = "ELComputerLookupPopIn"; // Mode top.Rstatus.Pstat("One moment while Computer LOOKUP request completes"); } } else if ( CurrentAlertType == "T" ) { // if SNMP Trap if ( RpmCC_VA.SnmpTrapMonitorFindByAGId(CurAlertID) ) { // if unable to initiate request ALupMode = ""; top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Computer LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag CountOfCompsRcvd = 0; CompIdLupArr = ""; // Computer Id Array ALupMode = "SNMPTrapComputerLookupPopIn"; // Mode top.Rstatus.Pstat("One moment while SNMPTrapWatch Computer LOOKUP request completes"); } } else if ( CurrentAlertType == "W" ) { // if Win Service if ( RpmCC_VA.NTServicesMonitorLookupAGID(CurAlertID) ) { // if unable to initiate request ALupMode = ""; top.Rstatus.Pstat("Unable to start the WinServicesWatch Computer LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag CountOfCompsRcvd = 0; CompIdLupArr = ""; // Computer Id Array ALupMode = "WSTComputerLookupPopIn"; // Mode top.Rstatus.Pstat("One moment while WinServicesWatch Computer LOOKUP request completes"); } } else if ( CurrentAlertType == "F" ) { // if File Check if ( RpmCC_VA.FileCheckLookup(CurAlertID) ) { ALupMode = ""; top.Rstatus.Pstat("Unable to start the FileWatch Computer lookup request",true); } else { VA_CommBusy = 1; // set Comm busy flag CountOfCompsRcvd = 0; CompIdLupArr = ""; // Computer Id Array ALupMode = "FCComputerLookupPopIn"; // Mode top.Rstatus.Pstat("One moment while FileWatch Computer lookup request completes"); } } else if ( CurrentAlertType == "P" ) { // if Process Check if ( RpmCC_VA.ProcessCheckLookup(CurAlertID) ) { ALupMode = ""; top.Rstatus.Pstat("Unable to start the ProcessWatch Computer lookup request",true); } else { VA_CommBusy = 1; // set Comm busy flag CountOfCompsRcvd = 0; CompIdLupArr = ""; // Computer Id Array ALupMode = "PCComputerLookupPopIn"; // Mode top.Rstatus.Pstat("One moment while ProcessWatch Computer lookup request completes"); } } else if ( CurrentAlertType == "L" ) { // if Syslog Check if ( RpmCC_VA.SyslogCheckLookup(CurAlertID) ) { ALupMode = ""; top.Rstatus.Pstat("Unable to start the SyslogWatch lookup request",true); } else { VA_CommBusy = 1; // set Comm busy flag CountOfCompsRcvd = 0; CompIdLupArr = ""; // Computer Id Array ALupMode = "SLComputerLookupPopIn"; // Mode top.Rstatus.Pstat("One moment while SyslogWatch Computer lookup request completes"); } } else { // must be Object:Counter var WrkArr = new Array(); // working array // get Obj ID from first triplet of "CompId.ObjId,CntrId" WrkArr = OCArray[0].split(","); CurObjID = WrkArr[1]; // Get Object ID; Set CurObjIx CurCntrID = WrkArr[2]; // Get Counter ID if ( RpmCC_VA.ObjectLookupForObjCompArray(CurObjID) ) { top.Rstatus.Pstat("Unable to start the Object LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag top.Rstatus.Pstat("One moment while Object LOOKUP request completes"); ALupMode = "EventPopIn"; } } } function setSelectAll(sFlag) { if ( sFlag ) { SButtonState(bSelC,"0"); SButtonState(bUselC,"0"); } else { // otherwise disable the buttons SButtonState(bSelC,"1"); SButtonState(bUselC,"1"); } } function SButtonState(BtObj,BState) { //BtObj.className = (BState == "0") ? "BoxButton" : "BoxButtonD"; BtObj.disabled = (BState == "0") ? "" : "disabled"; } var CountOfCompsRcvd = 0; var LogTable = new Array("Application","Security","System","Directory Service","DNS Server","File Replication Service"); var CurELName = ""; function processELMonitorLookupRecord(ELCrec) { var wrkarr = new Array(); ++CountOfCompsRcvd; wrkarr = ELCrec.split("~"); // parse the computer record if ( CountOfCompsRcvd > 1 ) { // if not first CompIdLupArr += ","; // Computer Id Array } else { for ( var i=0; i<LogTable.length; i++ ) { if ( LogTable[i] == wrkarr[4] ) { CurELName = wrkarr[4]; break; } } } CompIdLupArr += wrkarr[2]; // Computer Id Array } function processELMonitorOpComplete() { if ( ALupMode == "ELComputerLookupPopIn" ) { if ( CountOfCompsRcvd > 0 ) { MaxCmpCount = CountOfCompsRcvd; SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : ""; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/sEventViewer.gif' width='16' height='16'></td>"; Tops += "<td width='*' class='optext'>" + CurELName + " Log</td>"; Tops += "</tr></table>"; CountOfComps = 0; // initialize ALupMode = "EventPopIn"; processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions } else { ALMode = ""; // reset mode top.Rstatus.Pstat("No associated computers found for this Event Log alert",true); } } } function processELMonitorOpError() { top.Rstatus.Pstat("Error reading Event Log Monitor alert parameters",true); } function processFCLookupOpComplete(FCLStat) { var wrkarr = new Array(); wrkarr = FCLStat.split(":"); // parse the lookup record if ( wrkarr[0] == "Err" ) { ALMode = ""; // reset mode top.Rstatus.Pstat(FCLStat,true); return; } wrkarr = FCLStat.split(";"); // parse the lookup record CompIdLupArr = wrkarr[1]; // get Computer ID array wrkarr = CompIdLupArr.split(","); CountOfCompsRcvd = wrkarr.length; if ( CountOfCompsRcvd > 0 ) { MaxCmpCount = CountOfCompsRcvd; SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : ""; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/NewImg.gif' width='13' height='13'></td>"; Tops += "<td width='*' class='optext'>FileWatch</td>"; Tops += "</tr></table>"; CountOfComps = 0; // initialize ALupMode = "EventPopIn"; processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions } else { ALMode = ""; // reset mode top.Rstatus.Pstat("No associated computers found for this FileWatch alert",true); } } function processPCLookupOpComplete(FCLStat) { var wrkarr = new Array(); wrkarr = FCLStat.split(":"); // parse the lookup record if ( wrkarr[0] == "Err" ) { ALMode = ""; // reset mode top.Rstatus.Pstat(FCLStat,true); return; } wrkarr = FCLStat.split(";"); // parse the lookup record CompIdLupArr = wrkarr[1]; // get Computer ID array wrkarr = CompIdLupArr.split(","); CountOfCompsRcvd = wrkarr.length; if ( CountOfCompsRcvd > 0 ) { MaxCmpCount = CountOfCompsRcvd; SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : ""; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/ProcessWatch.gif' width='13' height='13'></td>"; Tops += "<td width='*' class='optext'>ProcessWatch</td>"; Tops += "</tr></table>"; CountOfComps = 0; // initialize ALupMode = "EventPopIn"; processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions } else { ALMode = ""; // reset mode top.Rstatus.Pstat("No associated computers found for this ProcessWatch alert",true); } } function processSLLookupOpComplete(SLLStat) { var wrkarr = new Array(); wrkarr = SLLStat.split(":"); // parse the lookup record if ( wrkarr[0] == "Err" ) { ALMode = ""; // reset mode top.Rstatus.Pstat(SLLStat,true); return; } wrkarr = SLLStat.split(";"); // parse the lookup record CompIdLupArr = wrkarr[1]; // get Computer ID array wrkarr = CompIdLupArr.split(","); CountOfCompsRcvd = wrkarr.length; if ( CountOfCompsRcvd > 0 ) { MaxCmpCount = CountOfCompsRcvd; SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : ""; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/SyslogDisplaySm.gif' width='13' height='13'></td>"; Tops += "<td width='*' class='optext'>SYSLOGWatch</td>"; Tops += "</tr></table>"; CountOfComps = 0; // initialize ALupMode = "EventPopIn"; processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions } else { ALMode = ""; // reset mode top.Rstatus.Pstat("No associated computers found for this SYSLOGWatch alert",true); } } function processWinServicesClupDone() { if ( ALupMode == "WSTComputerLookupPopIn" ) { if ( CountOfCompsRcvd > 0 ) { MaxCmpCount = CountOfCompsRcvd; SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : ""; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/WinServices.gif' width='18' height='18'></td>"; Tops += "<td width='*' class='optext'>WinServicesWatch</td>"; Tops += "</tr></table>"; CountOfComps = 0; // initialize ALupMode = "EventPopIn"; processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions } else { ALMode = ""; // reset mode top.Rstatus.Pstat("No associated computers found for this WinServicesWatch alert",true); } } } function processPopulateSNMPTrapComputerse(coidstrg) { var SNMPTrapCompRecs = new Array; SNMPTrapCompRecs = coidstrg.split(";"); // parse out the Trap Monitor Computer records for ( var i=0; i<SNMPTrapCompRecs.length-1; i++ ) { // process out Trap Monitor records ++CountOfCompsRcvd; warr1 = SNMPTrapCompRecs[i].split("~"); // parse each record if ( i > 0 ) { // if not first one CompIdLupArr += ","; // Computer Id Array } CompIdLupArr += warr1[2]; // Computer Id Array } if ( CountOfCompsRcvd > 0 ) { MaxCmpCount = CountOfCompsRcvd; SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : ""; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/snmp_sm.gif' width='16' height='16'></td>"; Tops += "<td width='*' class='optext'>SNMPTrapWatch</td>"; Tops += "</tr></table>"; CountOfComps = 0; // initialize ALupMode = "EventPopIn"; processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions } else { ALMode = ""; // reset mode top.Rstatus.Pstat("No associated computers found for this SNMPTrapWatch alert",true); } } function processPopulateInputObject(ON,OD,OA) { /* Format Output */ CurObjName = ON; // save Object name CurObjDesc = OD; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/Objects.gif' width='16' height='16' style='cursor:hand' title='"; Tops += OD + "'></td>"; Tops += "<td width='*' class='optext'>" + ON + "</td>"; Tops += "</tr></table>"; } function processPopulateInputObjectOpComplete() { if ( PopUpDiv.style.display == "none" ) return; // exit if Configure Window no longer present /* Lookup Counter Name and Description */ if ( RpmCC_VA.CounterLookupForObjCntrArray("CounterID,"+CurCntrID) ) { top.Rstatus.Pstat("Unable to start the Counter LOOKUP request",true); ALupMode = ""; // reset } else { CurCntrName = ""; VA_CommBusy = 1; // set Comm busy flag top.Rstatus.Pstat("One moment while Counter LOOKUP request completes"); } } var CountOfComps = 0; var MaxCmpCount = 0; var CompIdLupArr = ""; function processPopulateInputCounter(CntrNme,CntrDesc,OCA) { if ( CurCntrName != "" || PopUpDiv.style.display == "none" ) { return; } var WrkArr = new Array(); // working array WrkArr = OCA.split(";"); WrkArr = WrkArr[0].split(","); if (CurCntrID != WrkArr[1]) { // Is this CounterID looking for? return; // no, skip it } CurCntrName = CntrNme; // Cuurent Open Counter WrkArr = CntrDesc.split("'"); CntrDesc = WrkArr.join("`"); CurCntrDesc = CntrDesc; /* Format Counter Name and Description */ Tops += "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='19' height='20' align='right'><img src='images/L.gif' width='19' height='20'></td>"; Tops += "<td width='20' align='center'><img src='images/Counter.gif' width='17' height='16' style='cursor:hand' title='"; Tops += CntrDesc + "'></td>"; Tops += "<td width='*' class='optext' >" + CntrNme + "</td>"; Tops += "</tr></table>"; /* Compute Array of Computer IDs */ CompIdLupArr = ""; // Computer Id Array MaxCmpCount = --OCArray.length; // adjust for null last entry SBObj.style.overflow = ( MaxCmpCount > 3 ) ? "scroll" : ""; for ( var i=0; i<MaxCmpCount; i++ ) { // get Computer ID from triplet of "CompId.ObjId,CntrId" WrkArr = OCArray[i].split(","); if ( i > 0) { CompIdLupArr += ","; // array id separator } CompIdLupArr += WrkArr[0]; } } /* OpComplete for the CounterLookupForObjCounterArray */ function processPopulateInputCounterOpComplete() { if ( PopUpDiv.style.display == "none" ) return; // exit if Configure Window no longer present /* Lookup Computer Names and Descriptions */ if ( RpmCC_VA.ComputerLookupByIDArray(CompIdLupArr) ) { top.Rstatus.Pstat("Unable to start the Computer LOOKUP request",true); ALupMode = ""; // reset } else { VA_CommBusy = 1; // set Comm busy flag CountOfComps = 0; top.Rstatus.Pstat("One moment while lookup request completes"); } } function processPopulateInputComputer(Cid,CmpNme,CmpDesc) { if ( PopUpDiv.style.display == "none" ) return; // exit if Configure Window no longer present /* Format Computer Name and Description */ if ( CountOfComps+1 == MaxCmpCount ) { // if Last Computer for Display lineGIF = "L"; } else { lineGIF = "T"; } /* if using from Filter Entry, determine if Checked */ CkdS = "' checked='0' src='images/Unchecked.gif'"; // default var CImg = "Computer"; if ( CkCArr.length > 0 ) { // if from Filter for ( var i=0; i<CkCArr.length; i++ ) { if ( Cid == CkCArr[i] ) { // if this matches a Checked one break; } } if ( i < CkCArr.length ) { // if match versus Checked Array of IDs CkdS = "' checked='1' src='images/Checked.gif'"; CImg = "sViewAlerts"; } } Tops += "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='39' height='20' align='right'><img src='images/" + lineGIF +".gif' width='19' height='20'></td>"; Tops += "<td width='11' align='center'><img id='cmpa_" + CountOfComps; Tops += "' cmpid='" + Cid + CkdS; Tops += " style='cursor:hand' onclick='procCompImgClick(this)' width='9' height='9'></td>"; Tops += "<td width='19' align='center'><img id='cmpb_" + CountOfComps; Tops += "' src='images/"+CImg+".gif' style='cursor:hand' onclick='procCompImgClick(this)' width='14' height='16' title='"; Tops += CmpDesc + "'></td>"; Tops += "<td width='*' class='"+CTparm+"'>" + CmpNme + "</td>"; Tops += "</tr></table>"; ++CountOfComps; // bump index } function processPopulateInputOpComplete() { /* Final Format and Output */ if ( PopUpDiv.style.display == "none" ) return; // exit if Configure Window no longer present ALupMode = ""; // reset SBObj.insertAdjacentHTML("beforeEnd",Tops); //DoneButton.className = "BoxButton"; // enable button DoneButton.disabled = ""; // enable button if ( CurrentAlertType != "U" ) { setSelectAll(true); // enable Select/UnselectAll buttons } SetCursor("auto"); if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") { top.Rstatus.Pstat("Request Completed"); AL_AlertSel.focus(); // restore focus } } function procUsrAltClick(CObj) { if ( CObj.id != "usralt0" ) return; if ( CObj.checked == "1" ) { // if currently Checked, Uncheck usralt1.src = "images/Unchecked.gif"; CObj.checked = "0"; // Set Unchecked } else { // otherwise Check usralt1.src = "images/Checked.gif"; CObj.checked = "1"; // Set Checked } processApplyButton(); } /* Process Click on Computer Image */ function procCompImgClick(COb) { isx = COb.id; if ( isx.charAt(0) != "c" ) // if not a "cmpa_xx" return; var cx = isx.substring(5,isx.length); // Strip off index CObj = document.all["cmpa_"+cx]; // Clicked Computer Entry var CIObj = document.all["cmpb_"+cx]; // Clicked Computer Entry Image if ( CObj.checked == "1" ) { // if currently Checked, Uncheck CObj.src = "images/Unchecked.gif"; CObj.checked = "0"; // Set Unchecked CIObj.src = "images/Computer.gif"; } else { // otherwise Check if ( CTparm == "optextr" ) { // if Suspended, don't add to filter top.Rstatus.Pstat("Alert is currently Suspended",true); if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") { AL_AlertSel.focus(); // restore focus } return; } CObj.src = "images/Checked.gif"; CObj.checked = "1"; // Set Checked CIObj.src = "images/sViewAlerts.gif"; } if ( arguments.length == 1 ) { processApplyButton(); } } /* Process DB Error in Alert Lookup Operation */ function processAlertEventOpError() { top.Rstatus.Pstat("An error occurred during Alert Event LOOKUP operation",true); } // Process Serverices LOOKUP Record Event var ServicesRecLength = 4; // Services Lookup record length var AC_ServicesStoreArr = new Array(); function processServicesRecord(SRVstrg) { var warr = new Array(); warr = SRVstrg.split("~"); var j = ServicesRecCount * ServicesRecLength; AC_ServicesStoreArr[j] = warr[1]; // Computer ID AC_ServicesStoreArr[j+1] = warr[2]; // AlertGroup ID warr[3] = (warr[3] == "SQLCONNECT") ? "SQL" : warr[3]; AC_ServicesStoreArr[j+2] = warr[3]; // Type AC_ServicesStoreArr[j+3] = SRVstrg; ++ServicesRecCount; // bump record counter } // Prcoess Services Operation Complete Event function processServicesOpComplete() { if ( ALupMode == "ServicesLookup" ) { CommObj = RpmCC_VA; ALupMode = "WinServicesLookup"; WinServicesArr.length = 0; // reset Array rstat = RpmCC_VA.NTServicesListLookupId("0"); if ( rstat ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the Win Services LOOKUP request",true); return; } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while Win Services LOOKUP request completes"); } } } var WinServicesArr = new Array(); var WinServicesArrEntrySz = 5; function processWinServicesLookup(WinSvcs) { WinServicesArr = WinSvcs.split("~"); // parse out the Win Services WinServicesLUPreqd = false; processWinServicesOpComplete(); // Go get the Trap Monitors } function processWinServicesOpComplete() { if ( ALupMode == "WinServicesLookup" ) { // Do TrapMonitor Record Lookup ALupMode = "TrapMonitorLookup"; rstat = RpmCC_VA.EnumSnmpTrapMonitor(); if ( rstat ) { // if unable to initiate request ALupMode = ""; // reset top.Rstatus.Pstat("Unable to start the SNMP Trap LOOKUP request",true); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while SNMP Trap LOOKUP request completes"); return; } } } var TrapMonRecSize = 3; function processEnumSnmpTrapMonitor(TMstrg) { var warr = new Array(); var warr1 = new Array(); // If done reading all records if ( TMstrg == "Done" ) { procOIDLookup(); // go lookup OID definitions } else { // Check if error warr1 = TMstrg.split(":"); if ( warr1[0] == "Err" ) { top.Rstatus.Pstat("Error reading SNMP Trap Monitor records. "+TMstrg); return; } // Otherwise, process record else { warr = TMstrg.split("~"); addElementToSelect(AC_TrapMonitorStore,warr[0]); // TrapMonitor ID addElementToSelect(AC_TrapMonitorStore,warr[2]); // Computer ID addElementToSelect(AC_TrapMonitorStore,warr[3]); // AlertGroup ID } } } function procOIDLookup() { // Get OID definitions if ( RpmCC_VA.EnumOidDefs() ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the OID LOOKUP request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while OID LOOKUP request completes"); } } var gOIDstrg = ""; var gOIDarray = new Array(); function processOIDLookupRecord(OIDstrg) { gOIDstrg = OIDstrg; // save gOIDarray = OIDstrg.split("~"); // parse AL_AlertSel.style.display = ""; // compnesate for IE 5.5 bug; see "hideAlertSel()" below // Done ALupMode = ""; processResetButton(); //ConfigButton.className = "BoxButton"; // enable button ConfigButton.disabled = ""; // enable button //ViewCurrentButton.className = "BoxButton"; // enable button ViewCurrentButton.disabled = ""; // enable button top.Rstatus.Pstat("Request Completed"); processValidateFilter(); // go validate the Alert Filter processAccumulatedAlerts(); // go process the accumulated Alerts top.banner.processStopCommX(); Tid = setTimeout("hideAlertSel()",50); // Delay 50 ms. then try to hide AlertSel } // compensate for IE 5.x bug function hideAlertSel() { Tid = null; AL_AlertSel.style.display = "none"; } function getOIDName(coid) { for ( var i=0; i<gOIDarray.length-1; i+=4 ) { if ( gOIDarray[i+2] == coid ) { // if match return gOIDarray[i+1]; } } return coid; } // Add Computer to Store if Not Already var CompRecLength = 3; function processCompAddToStore(CNme,CDesc,Cid) { for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) { if ( Cid == AC_CompStoreArr[i] ) { // if in Store, skip it return; } } // Not in Store, Add now AC_CompStoreArr[i++] = Cid; AC_CompStoreArr[i++] = CNme; AC_CompStoreArr[i] = CDesc; } var curCompDesc = ""; function getCompNameDesc(CompID) { for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) { if ( CompID == AC_CompStoreArr[i] ) { // if in Store // save Computer Name and Description curServAlertCompDesc = AC_CompStoreArr[i+2]; curServAlertCompNme = AC_CompStoreArr[i+1]; return true; } } return false; } // Process to Toggle the Hide and Show of the Banner & Menu Frames var hideToggle = 0; var TitleDivSize = 100; function processBannerMenu() { if ( hideToggle == 0 ) { top.BannerMenuHide(); hideToggle = 1; ViewAlertsTitleDiv.style.display = "none"; TitleDivSize = 56; } else { top.BannerMenuShow(); hideToggle = 0; ViewAlertsTitleDiv.style.display = ""; TitleDivSize = 100; } } // Process SelectALL or UnselectALL function processSelect(Pflg) { var CObj = null; for ( var j=0, i=0; j<CountOfComps; j++ ) { CObj = document.all["cmpa_"+j]; // computer entry in tree if (CObj.checked == Pflg) { procCompImgClick(CObj,true); // go process ++i; // bump number changed } } if ( i > 0 ) { processApplyButton(); } if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") { AL_AlertSel.focus(); // restore focus } } // Null funcs function processResetButton() { top.banner.processStopCommX(); } function checkEnableSchedButton() { } function PopUpContextOpen() { AL_AlertSel.style.visibility = "hidden"; } function PopUpContextClose() { AL_AlertSel.style.visibility = "visible"; } function GetFileCheckStatus(fcstat) { var csStatusParm="", csStatusList="Status: "; var warr = new Array(); var lStat = parseInt(fcstat, 10); csStatusList += (lStat & FILE_STRING_MATCH) ? "SearchString Match; " : ""; csStatusList += (lStat & FILE_DATE_CHANGE) ? "Date Change; " : ""; csStatusList += (lStat & FILE_SIZE_CHANGE) ? "Size Change; " : ""; csStatusList += (lStat & FILE_SIZE_MAX) ? "Exist or MaxSize Exceeded; " : ""; csStatusList += (lStat & FILE_DELETED) ? "Deleted; " : ""; return csStatusList; } function GetProcessCheckStatus(fcstat) { var csStatusParm="", csStatusList="Status: "; var warr = new Array(); var lStatus = parseInt(fcstat, 10); csStatusList += (lStatus & NOT_RUNNING_NO_RESTART) ? "Process Not Running; No Restart Attempted " : ""; csStatusList += (lStatus & NOT_RUNNING_RESTARTED) ? "Process Not Running; Successfully Restarted " : ""; csStatusList += (lStatus & NOT_RUNNING_RESTART_FAILED) ? "Process Not Running; Restart Failed " : ""; csStatusList += (lStatus & RUNNING_HALTED) ? "Process Running; Terminated " : ""; csStatusList += (lStatus & RUNNING_NOT_HALTED) ? "Process Running; No Terminate Attempt " : ""; csStatusList += (lStatus & RUNNING_EXCEEDED_CPU) ? "Process Running & Exceeded CPU Threshold " : ""; csStatusList += (lStatus & RUNNING_EXCEEDED_MEMORY) ? "Process Running & Exceeded a Memory Threshold " : ""; csStatusList += (lStatus & RUNNING_EXCEEDED_CPU_HALTED) ? "Process Running & Exceeded CPU Threshold; Terminated " : ""; csStatusList += (lStatus & RUNNING_EXCEEDED_MEMORY_HALTED) ? "Process Running & Exceeded a Memory Threshold; Terminated " : ""; return csStatusList; } function GetFacility(FacCode) { var csFacility; switch ( parseInt(FacCode) ) { case 0: csFacility = "Kernel"; break; case 1: csFacility = "User-Level"; break; case 2: csFacility = "Mail System"; break; case 3: csFacility = "System Daemons"; break; case 4: csFacility = "Security/Authorization (4)"; break; case 5: csFacility = "Internal by Syslogd"; break; case 6: csFacility = "Line Printer Subsystem"; break; case 7: csFacility = "Network News Subsystem"; break; case 8: csFacility = "UUCP Subsystem"; break; case 9: csFacility = "Clock Daemon (9)"; break; case 10: csFacility = "Security/Authorization (10)"; break; case 11: csFacility = "FTP Daemon"; break; case 12: csFacility = "NTP Subsystem"; break; case 13: csFacility = "Log Audit"; break; case 14: csFacility = "Log Alert"; break; case 15: csFacility = "Clock Daemon (15)"; break; case 16: csFacility = "Local Use 0"; break; case 17: csFacility = "Local Use 1"; break; case 18: csFacility = "Local Use 2"; break; case 19: csFacility = "Local Use 3"; break; case 20: csFacility = "Local Use 4"; break; case 21: csFacility = "Local Use 5"; break; case 22: csFacility = "Local Use 6"; break; case 23: csFacility = "Local Use 7"; break; default: csFacility = FacCode; } return csFacility; } function GetSeverity(SevCode) { var csSeverity; switch ( parseInt(SevCode,10) ) { case 0: csSeverity = "Emergency"; break; case 1: csSeverity = "Alert"; break; case 2: csSeverity = "Critical"; break; case 3: csSeverity = "Error"; break; case 4: csSeverity = "Warning"; break; case 5: csSeverity = "Notice"; break; case 6: csSeverity = "Informational"; break; case 7: csSeverity = "Debug"; break; default: csSeverity = SevCode; } return csSeverity; } //--> </script> <script LANGUAGE="JAVASCRIPT" SRC="js/Calendar.js" PURPOSE="COMPONENT" CLASSNAME="com.netobjects.Calendar"></script> <script LANGUAGE="JavaScript" src="js/MiscFunc.js"></script> <script LANGUAGE="JavaScript" src="js/ButtonFunc.js"></script> <script LANGUAGE="JavaScript" src="js/CalendarTimeFunc.js"></script> <script LANGUAGE="JavaScript" src="js/AlertFunc.js"></script> <script LANGUAGE="JavaScript" src="js/WinServicesFunc.js"></script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Connected()"> <!-- processConnectConfirmed(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="DBChanged(cdata)"> <!-- var warr = new Array(); warr = cdata.split("~"); // parse the event data // Ignore if Server Table change if ( warr[0] == "4" ) return; // ignore top.Rstatus.StatDB.style.display = ""; if ( CTid == null ) { CTid = setTimeout("processDBChanged()",30000); // Delay 30 secs then process } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Disconnected()"> <!-- top.Rstatus.Pstat("Disconnected",true); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processReconnect()",10000); // Delay 10 secs then try reconnnect //--> </script> <script FOR="RpmCC_VA" EVENT="ServicesRecord(SRVstrg)"> <!-- processServicesRecord(SRVstrg); //--> </script> <script FOR="RpmCC_VA" EVENT="ServicesOpComplete()"> <!-- processServicesOpComplete(); //--> </script> <script FOR="RpmCC_VA" EVENT="ServicesOpError()"> <!-- processServicesOpError(); //--> </script> <script FOR="RpmCC_VA" EVENT="AlertServicesLogRecord(LogRecStrg)"> <!-- MRLogRecID = null; // clear Log Record ID processAlertServicesLogRecord(LogRecStrg); //--> </script> <script FOR="RpmCC_VA" EVENT="AlertServicesLogOpError()"> <!-- //top.Rstatus.Pstat("Services Log Record Get Error",true); //alert("AlertServicesLogOpError()"); //if ( MRLogRecID != null ) { // retry Record Get //RpmCC_VA.ServicesLogGetRecord(MRLogRecID); //MRLogRecID = null; //} //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ProcessCheckLogLookup(FCLogRec)"> <!-- processAlertProcessCheckRecord(FCLogRec); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ProcessCheckLookup(FCLStat)"> <!-- processPCLookupOpComplete(FCLStat); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="FileCheckLogLookup(FCLogRec)"> <!-- processAlertFileCheckRecord(FCLogRec); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="FileCheckLookup(FCLStat)"> <!-- processFCLookupOpComplete(FCLStat); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SyslogCheckLogLookup(SLLogRec)"> <!-- processAlertSyslogCheckRecord(SLLogRec); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SyslogCheckLookup(SLLStat)"> <!-- processSLLookupOpComplete(SLLStat); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesLogLookup(WSLogRec)"> <!-- warr = new Array(); warr = WSLogRec.split("~"); // find available slot in pending array for ( var i=0; i<WSAE_Arr.length; i+=WSAE_ArrRecLength ) { if ( WSAE_Arr[i] == 0 ) { break; // empty slot } } WSAE_Arr[i] = warr[0]; // NTServicesLog ID WSAE_Arr[i+1] = warr[1]; // NTServicesMonitor ID WSAE_Arr[i+2] = WSLogRec; // save string WSAE_Arr[i+3] = ""; // reserve for AGID WSAE_Arr[i+4] = ""; // reserve for NTServicesLinkID RpmCC_VA.NTServicesMonitorLookup(warr[1]); // read Monitor record //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesMonitorLookup(WSMonRec)"> <!-- var warr = new Array(); warr = WSMonRec.split("~"); for ( var i=0; i<WSAE_Arr.length; i+=WSAE_ArrRecLength ) { if ( WSAE_Arr[i+1] == warr[0] && WSAE_Arr[i+4] == "" ) { // Match on MonitorID break; // found } } if ( i < WSAE_Arr.length ) { WSAE_Arr[i+4] = warr[2]; // save NTServicesLinkID WSAE_Arr[i+3] = warr[3]; // AGID ALupMode = ""; // reset RpmCC_VA.NTServicesLinkListLookupByID(warr[2]); // read NTServcicesLink record } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesLinkLookupByID(WSLIDrec)"> <!-- if ( ALupMode == "WSTComputerLookupPopIn" ) { processWServicesLinkIDLookupRecord(WSLIDrec); return; } var warr = new Array(); var warr0 = new Array(); warr = WSLIDrec.split("~"); for ( var i=0; i<WSAE_Arr.length; i+=WSAE_ArrRecLength ) { if ( WSAE_Arr[i+4] == warr[0] ) { // Match on NTServicesID break; // found } } if ( i < WSAE_Arr.length ) { // if match warr0 = WSAE_Arr[i+2].split("~"); // parse original log record warr0[1] = WSAE_Arr[i+3]; // Substitute AGID over the MonitorID var WSarec = warr0.join("~"); WSarec += "~"+warr[2]+"~"+warr[1]; // Computer ID and Service ID processAlertWinServicesRecord(WSarec); // free up entry for ( var j=0; j<WSAE_ArrRecLength; j++ ) { WSAE_Arr[i+j] = 0; // free up slot } } // Reset Array if empty for ( var i=0; i<WSAE_Arr.length; i+=WSAE_ArrRecLength ) { if ( WSAE_Arr[i] != 0 ) { // If in use break; // found } } if ( i >= WSAE_Arr.length ) { // if empty WSAE_Arr.length = 0; } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesListLookupId(WinSvcs)"> <!-- processWinServicesLookup(WinSvcs); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesMonitorLookupAGID(WSTc)"> <!-- processPopulateWSTComputersContinue(WSTc); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupLookupRecordPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs)"> <!-- AlertLupRecPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupLookupRecordPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend)"> <!-- AlertLupRecPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpComplete()"> <!-- processAlertOpComplete(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpError()"> <!-- processAlertOpError(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertEventLookupRecord1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme)"> <!-- AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertEventLookupRecord2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver)"> <!-- AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertEventsOpComplete()"> <!-- processAlertEventOpComplete(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertEventsOpError()"> <!-- processAlertEventOpError(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ObjectLookupRecordObjCompArray(ON,OD,OA)"> <!-- processPopulateInputObject(ON,OD,OA); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ObjectOpComplete()"> <!-- processPopulateInputObjectOpComplete(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ObjectOpError()"> <!-- processObjectOpError(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="CounterLookupRecordObjCntrArray(CN,CD,OA)"> <!-- processPopulateInputCounter(CN,CD,OA); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="CounterOpComplete()"> <!-- processPopulateInputCounterOpComplete(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="CounterOpError()"> <!-- processCounterOpError(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerLookupRecord(Cid,Gid,SrvID,Nme,Desc,Pswd,OSVer,Addr,Port)"> <!-- processCompAddToStore(Nme,Desc,Cid); if ( ALupMode == "UserAlertEvent" ) { processAlertUserComputerLookup(Cid,Nme,Desc); } else if ( ALupMode == "AlertEvent" ) { processAlertServicesComputerLookup(Cid,Nme,Desc); } else if ( ALupMode == "EventPopIn" ) { processPopulateInputComputer(Cid,Nme,Desc); } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpComplete()"> <!-- if ( ALupMode == "EventPopIn" ) { processPopulateInputOpComplete(); } VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpError()"> <!-- processComputerOpError(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StartCommunication()"> <!-- top.banner.processStartComm(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StopCommunication()"> <!-- top.banner.processStopComm(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorOpComplete()"> <!-- VA_CommBusy = 0; // reset Comm busy flag processELMonitorOpComplete(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorOpError()"> <!-- VA_CommBusy = 0; // reset Comm busy flag processELMonitorOpError(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EventLogDataRecord(ELData)"> <!-- VA_CommBusy = 0; // reset Comm busy flag processAlertEventLogRecord(ELData); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorLookupRecord(ELCrec)"> <!-- VA_CommBusy = 0; // reset Comm busy flag processELMonitorLookupRecord(ELCrec); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EnumSnmpTrapMonitor(TMstrg)"> <!-- VA_CommBusy = 0; // reset Comm busy flag processEnumSnmpTrapMonitor(TMstrg); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SnmpTrapLogRecord(STLData)"> <!-- VA_CommBusy = 0; // reset Comm busy flag processAlertSNMPRecord(STLData); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SnmpTrapMonitorFindByAGId(coidstrg)"> <!-- processPopulateSNMPTrapComputerse(coidstrg); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EnumOidDefs(ostrg)"> <!-- processOIDLookupRecord(ostrg); //--> </script> <script LANGUAGE="JavaScript" src="js/PopUpMenuFunc.js"></script> <object ID="RpmCC_VA" NAME="RpmCC_VA" WIDTH="14" HEIGHT="1" style="display:none" CLASSID="CLSID:D88C2358-FC83-11D1-BF49-00104B2D6F80" CODEBASE="controls/RPMComm.cab#version=5,2,0,0"> <param name="_Version" value="65536"> <param name="_ExtentX" value="2646"> <param name="_ExtentY" value="1341"> <param name="_StockProps" value="0"> </object> <!-- Invisible Object to Support Simulated Click Event --> <button id="FakeBut" style="display:none" onclick="top.banner.savePageCoord(event,document.body,'ViewAlerts')"> </button> <!-- Define Images used in dynamic HTML generation to force loading and caching now --> <div style="display:none"> <img src="images/sEventViewer.gif"><img src="images/Counter.gif"><img src="images/Unchecked.gif"> <img src="images/monitoritalert.gif"><img src="images/Computer.gif"><img src="images/L.gif"> <img src="images/Checked.gif"><img src="images/T.gif"><img src="images/Objects.gif"> <img src="images/sAdminServers.gif"> </div> <!-- PopUp to Prompt to Configure the Alert Filter --> <div id="PopUpDiv" class="PopUpBox" style="display:none; left:150; top:150; "> <span id="ELogConfigLine" > <center height="28" style="width:500; font-weight:800; font-size:10pt; background-color:graytext; color:captiontext" >Configure Alert Log Filter</center> <center><div class="EventConfig" id="ELogConfig" style="width:500px;" align="center"> <table border="0" width="500" > <tr> <td width="90" align="right" class="inputlabel" height="32">Watch/Alert:</td> <td width="390" align="left" height="1"> <select ONCHANGE="processAlertName()" SIZE="1" NAME="AL_AlertSel" id="AL_AlertSel" class="idis" style="width: 185pt" style="display: none"></select> </td> <select SIZE="1" NAME="AC_TrapMonitorStore" style="display: none"></select> </tr> <tr style="display:none"> <td width="90" align="right" class="inputlabel" height="32">Start Date:</td> <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StartDate" calendar="VA_calwin" CalObj="" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand"> </td> </tr> <tr style="display:none"> <td width="90" align="right" height="1"></td> <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_calwin" ID="VA_calwin" CalState="0" style="display: none"></div></td> </tr> <tr style="display:none"> <td width="90" align="right" class="inputlabel" height="1">Stop Date:</td> <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StopDate" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand" CalObj="" calendar="VA_scalwin"></td> </tr> <tr style="display:none"> <td width="90" align="right" height="1"></td> <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_scalwin" ID="VA_scalwin" CalState="0" style="display: none"></div></td> </tr> <tr> <td width="90" align="right" class="inputlabel" height="1">Selection(s):</td> <td width="390" align="left" height="1"> <div id="VA_Select" class="VASelectBox"></div> </td> </tr> </table></div><table border="1" cellspacing="1" cellpadding="1" height="40" width="500"> <tr><td colspan="2" align="center"><button onclick="processSelect('0')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:80px; height:28px" id="bSelC" ><img src="images/selectall.gif" align="absmiddle" height="15" width="14">Select All</button>  <button onclick="processSelect('1')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:93px; height:28px" id="bUselC" ><img src="images/unselectall.gif" align="absmiddle" height="15" width="14">Unselect All</button>  <button id="DoneButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Cancel and Hide the Configure Filter" style="width:70px; height:28px" onClick="processDoneButton()"><img src="images/CloseImg.gif" align="absmiddle" height="14" width="15"> Close</button></td></tr> </table></center></span> </div> <!-- End of PopUp to Prompt to Configure the Alert Filter --> <center> <div id="VA_MainBox" class="VAMainBox" style="display:none"> <div id="ViewAlertsTitleDiv"><table border="1" borderColor="activeborder" align="left"> <table border="1" borderColor="activeborder" align="left"> <tr><td borderColorDark="graytext" borderColorLight="white" style="font-weight:800; font-size:12pt; background-color:threedhighlight; color:windowtext"> <img src="images/sViewAlerts.gif" align="absmiddle" height="16" width="16"> Alert Watch Display </td></tr> </table> <BR CLEAR=ALL><HR align="left"></div> <!-- Alert Event Log Window --> <center class="inputlabel">Alert Log</center> <div class="EventLog" ID="ELogWin" style="width:99%" align="center"><span id="ELogText"></span><select SIZE="1" NAME="ELogParams" logeventid="" logtime="0" ELBgFlg=0 style="display: none"></select></div> <div style="height:0px; width:99%" align="center"> <select SIZE="1" NAME="VA_EventStore" style="display: none"></select> <select SIZE="1" NAME="VA_ServEventStore" style="display: none"></select> <select SIZE="1" NAME="VA_UserEventStore" style="display: none"></select> <select SIZE="1" NAME="VA_CounterEventStore" style="display: none"></select> <table border="1" cellspacing="1" cellpadding="1" height="40" width="100%"> <tr> <td width="15%" align="left" class="inputlabel"><span title="Uses the 'Asterisk' WAV assignment in Control Panel->Sounds & Multimedia Properties"><INPUT TYPE="checkbox" NAME="AlertAudioEnabled" id="AlertAudioEnabled" class="inputlabel" CHECKED>Audio Alert</span></td> <td align="center" width ="70%"><button id="ViewCurrentButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="View Filter for Alerts and associated Events displayed in the Event Log" style="width:90px; height:29px" onClick="processViewCurrentButton()" disabled><img src="images/OpenImg.gif" align="absmiddle" height="14" width="15"> View Filter</button> <button id="ConfigButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Configure Filter for Alerts and associated Events displayed in the Event Log" style="width:120px; height:29px" onClick="processConfigureButton()" disabled><img src="images/ConfigImg.gif" align="absmiddle" height="18" width="17">Configure Filter</button> <button id="ClearButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Clear the Event Log" style="width:90px; height:29px" onClick="processClearButton()" disabled><img src="images/unselectall.gif" align="absmiddle" height="15" width="14"> Clear Log</button> <button id="StatusPrintButton" title="Print AlertWatch Status Log" onclick="if (this.bdis == '0') processPrintStatus();" bdis="0" style="width:90px; height:29px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" DISABLED><img src="images/Printer.gif" align="absmiddle" height="15" width="17"> Print</button></td> <td width="15%" align="right"><button onclick="processBannerMenu()" title="Press to Toggle Hide/Show of Menu and Banner Frames" style="cursor:hand"><img src="images/FullView.gif" align="absmiddle" height="16" width="16"></button></td></tr></table></div> <!-- Alert Filter Window--> <span id="ELogViewCurLine" style="display:none"><HR align="left"> <center class="inputlabel" >Alert Log Filter</center> <div class="EventFilter" ID="ELogViewCur" style="height:110px; width:530px; " align="center"> <select SIZE="1" NAME="VA_FilterStore" style="display: none"></select> </div> <table border="1" cellspacing="1" cellpadding="1" height="40" width="40%"> <tr><td align="center"><button id="VC_DeleteButton" disabled="disabled" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Delete the Selected Filter Entry and stop display of associated Events in the Event Log" style="width:100px; height:28px" onClick="processDeleteEntryButton()"><img src="images/DelImg.gif" align="absmiddle" height="14" width="14">Delete Entry</button>  <button style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Hide the Filter Display" style="width:100px; height:28px" onClick="processHideCurrentButton()"><img src="images/collapse.gif" align="absmiddle" height="14" width="16">Collapse</button></td></tr> </table></span> <!--<div style="height:3px; width:92%" align="center"></div>--> </center></div> </center> </body> </html>