This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

DFS Application Monitor Template--Anyone using this?

I had been having quite a few DFS replication/synchronization issues, and frankly, SAM wasn't much help in identifying and troubleshooting problems. 

I think I finally fixed the biggest issues, so I am hoping that at least SAM might help me monitor my DFS from now on.

Frankly, there doesn't seem to be a lot of detail up here on DFS, or how to really use SAM to monitor it effectively.  So I guess I am just putting this out there, hoping to generate some discussion and helpful tips for those of us who would like to use this tool to help with DFS.  Here is where I am at so far:

What I have noticed is the DFS template is a mix of 24 components, some of which are specific to a replicated folder (5 of the 24)--they simply will not function without an instance ID--and others that are at the namespace or server level.

So what I did is create 2 new app monitor templates, one with the 5 folder-specific components which I assigned to every replicated folder I have, and another template (with the other 19 components) which I assigned to each server that participates in DFS.

Some of the "generic" components seem like they would be more appropriate for folder-level monitoring (e.g. staging space above high watermark, replication stopped, no space for replication, etc).  I am thinking that if I added a foldername filter to the component, that it would then be appropriate to move them over into the folder monitor template.  But that gets to be a LOT of heavy lifting as the number of replicated folders increases.

I would love to see a mechanism within a application monitor to set something once, and then have all the components "inherit" it from the app monitor, just like the app monitor can inherit credentials from the node.

Thoughts anyone?

  • It seems you're focused on the statistic monitors within this template, but in theory if you were experiencing replication issues with DFS then it's likely the Windows Event Log monitors within that template would have raised an alert and notified you. 

  • I am not really trying to be focused on anything, I am just trying to make sense of the template.  I agree that the Event Logs will often be the lead indicator, which is why I was wondering if there were some event log monitors that I should transfer to my custom "Replicated Folder" app monitor, and make it instance-specific by adding a filter that included the folder name?

  • Yes, if you are not using the out-of-the-box DFS template included with SAM I would recommend copying at the very least the Windows Event Log Monitors to you custom application template.

  • You can do this with a script monitor. This is from while ago, but if you enable DFSR on the polling server(s), then you can use that to talk to DFSR servers.

    The body of the script I wrote for this monitor:

    GIST clicky

    /*

    Notes:

    1) The filepath for dfsrdiag.exe may have to be configured for each DFS server

    2) Argument(0) is the IP Address of the server that will be monitored, and is defined in Orion as ${IP} in the Arguments field

    */

    strComputer = Wscript.Arguments(0)

    Dim message, statistic

    statistic = 0

    message = "Replication Group   Sending Partner   Receiving Partner   Backlog" & " | "

    Set oWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MicrosoftDFS")

    Set colRGroups = oWMIService.ExecQuery("SELECT * FROM DfsrReplicationGroupConfig")

    For Each oGroup in colRGroups

      Set colRGFolders = oWMIService.ExecQuery("SELECT * FROM DfsrReplicatedFolderConfig WHERE ReplicationGroupGUID='" & oGroup.ReplicationGroupGUID & "'")

      For Each oFolder in colRGFolders

      Set colRGConnections = oWMIService.ExecQuery("SELECT * FROM DfsrConnectionConfig WHERE ReplicationGroupGUID='" & oGroup.ReplicationGroupGUID & "'")

      For Each oConnection in colRGConnections

      binInbound = oConnection.Inbound

      strPartner = oConnection.PartnerName

      strRGName = oGroup.ReplicationGroupName

      strRFName = oFolder.ReplicatedFolderName

      If binInbound = True Then

      strSendingComputer = strPartner

      strReceivingComputer = strComputer

      Else

      strSendingComputer = strComputer

      strReceivingComputer = strPartner

      End If

      If oConnection.Enabled = True Then

      numBackLog = getBackLog(strSendingComputer, strReceivingComputer, strRGName, strRFName)

      If numBackLog > 0 Then

      message = message & strRGName & "   " & strSendingComputer & "   " & strReceivingComputer & "   " & numBackLog & " | "

      statistic = Int(statistic) + Int(numBackLog)

      End If

      End If

      Next

      Next

    Next

    Wscript.Echo "Statistic:" & Statistic

    IF Statistic=0 Then

    message="No Backlog"

    End If

    Wscript.Echo "Message: " & message

    Function getBackLog(strSending, strReceiving, strReplicationGroup, strReplicatedFolder)

      Set WshShell = CreateObject ("WScript.Shell")

      Set objExec = WshShell.Exec("C:\Windows\winsxs\amd64_microsoft-windows-dfsr-util-dfsrdiag_31bf3856ad364e35_6.1.7601.17514_none_37e405c70226f6a6\dfsrdiag.exe Backlog /RGName:" & strReplicationGroup & " /RFName:" & strReplicatedFolder & " /SendingMember:" & strSending & " /ReceivingMember:" & strReceiving)

      strResult = ""

      Do While Not objExec.StdOut.AtEndOfStream

      strResult = strResult & objExec.StdOut.ReadAll() & "\\"

      Loop

      If InStr(strResult, "No Backlog") > 0 Then

      getBackLog = 0

      Else

      arrLines = Split(strResult, "\\")

      If(UBound(arrLines)>1) Then

                       If(InStr(arrLines(1),":")) Then

                    arrResult = Split(arrLines(1), ":")

        getBackLog = arrResult(1)

                       End If

                    End If

      End If

    End Function