SLA Manager - OMIS 675
Lab Objective: Build an add-on to you System Tracker page that displays Service Level Agreement information, as well as an escalation procedure for down servers. This lab will focus on implementing AJAX update panels, and coding. See mine
This a “Stretch” assignment meaning there will be portions of the programming requirements that you’ll have to figure out. Feel free to ask questions on this assignment.
Due end of class 4/9. 25pts.
Point Breakdown = 19 Points to complete the assignment as is
+2 points for each of the three programming challenges indicated by the (PROGRAMMING CHALLENGE) tag
Dim DownSecs = DateDiff(DateInterval.Second, Session("Status_Change"), Date.Now)
Dim DownMins = DateDiff(DateInterval.Minute, Session("Status_Change"), Date.Now)
Dim DownHours = DateDiff(DateInterval.Hour, Session("Status_Change"), Date.Now)
If DownHours >= 1 Then
lblStatusTime.Text = DownHours & ":" & (DownMins - (DownHours * 60)) & ":" & ((DownSecs) - (DownMins * 60))
Else
lblStatusTime.Text = DownSecs
End If
Dim conn As SqlConnection
Dim cmd1, cmd2 As SqlCommand
Dim cmdString1 As String = "Select Status_Change FROM Servers WHERE Servers.ID = '" & GridView1.SelectedValue & "'"
conn = New SqlConnection("Data Source=yourserverName\INSTANCENAME;Initial Catalog=yourdatabaseName; User ID=sa; Password=yourSApassword")
‘'the previous command is should be on one line. Replace the info in pink with your database information.
cmd1 = New SqlCommand(cmdString1, conn)
conn.Open()
Dim dr As SqlDataReader
dr = cmd1.ExecuteReader
While dr.Read
Session("Status_Change") = dr(0)
End While
conn.Close()
GetServerData()
3: Change the text color based on Server Status
Dim R As GridViewRow
R = GridView1.SelectedRow
lblServerName.Text = R.Cells(2).Text
lblStatus.Text = R.Cells(7).Text
If R.Cells(7).Text = "UP" Then
lblServerName.ForeColor = Drawing.Color.Green
lblStatus.ForeColor = Drawing.Color.Green
lblStatusTime.ForeColor = Drawing.Color.Green
lblUpDown.Text = "Up Time: "
lblAction.Text = "Relax"
End If
Dim cmd2 As SqlCommand
Dim conn As SqlConnection
conn = New SqlConnection("Data Source=yourserverName\INSTANCENAME;Initial Catalog=yourdatabaseName; User ID=sa; Password=yourSApassword")
'the previous command is should be on one line. Replace the info in pink with your database information.
Dim getEMPLID1 As String = "SELECT Employee.Phone, Employee.Email, Employee.Last, Employee.First FROM Servers INNER JOIN Support " & _
"ON Servers.SupportID = Support.SUPPORT_ID INNER JOIN Call_List ON Support.CALL_LIST_ID = Call_List.CALL_LIST_ID INNER JOIN Employee " &
"ON Call_List.EmplID1 = Employee.EmplID Where Servers.ID=" & GridView1.SelectedValue & ""
cmd2 = New SqlCommand(getEMPLID1, conn)
conn.Open()
Dim dr As SqlDataReader
dr = cmd2.ExecuteReader
dr.Read()
Session("First") = Convert.ToString(dr("First"))
Session("Last") = Convert.ToString(dr("Last"))
Session("Email") = Convert.ToString(dr("Email"))
Session("Phone") = Convert.ToString(dr("Phone"))
conn.Close()
lblAction.Text = "Contact: " & Session("First") & " " & Session("Last") & ", " & Session("Phone") & ", " & Session("Email")
4: Create an escalation policy
(PROGRAMMING CHALLENGE)
If Server has been down 1/4 of acceptable downtime, or less: Call Primary support person. (For 4 hour OK down time that’s 1 hour, for 8 hour OK downtime that’s 2 hours, etc)
If Server has been down ½ of acceptable down time: Call Secondary Support Person.
If Server has been down for ¾ of acceptable down time: Call Third Level Support Person.
If Server has been down for over acceptable down time: Call Operations Manager.
NOTES: