DFS Backlog (RG)

DFS Backlog (RG)

I started with sprintgeek's post and after a bit of web searching and a lot of testing I have created this PowerShell DFS Backlog monitor, which will collect the inbound and outbound backlog for each Replication Group and return them in SolarWinds friendly format. The PowerShell script needs to Execution Mode:  "Remote Host" and supplied with suitable credentials to allow the script to check both outbound and inbound backlogs. The servername needs to be added to the Script Arguments, otherwise it should work out of the box. I hope it helps, yaquaholic

  • The ten returns is a SAM limitation, I am afraid. emoticons_sad.png

    You'll need to hard code the script to return sets of 10, then duplicating the script (hard coded to the next 10), until to you return all the data you want.

    Which is rather annoying...

  • This works great, as long as there are less than 10 outputs.  I'm able to run the script manually against our DFSr member servers and it pulls out the correct values, thanks for the script!  My environment has more than 10 outputs for each DFSr member server. (there are about 35 DFSr memberships on some of the nodes).  I'm struggling to figure out how to get this working correctly, given the APM limitation of 10 returns for powershell scripts.

    I thought maybe I could split the output up into separate pieces but was unable to get solarwinds to handle parsing out the data correctly and the monitor still fails. 

    I was considering splitting the output into 10 (or less) output returns by either splitting the variable $backloginfo into groups, then running a component monitor multiple times in solarwinds to select only the first 10, next 10, next 10, last 10 outputs, then having APM parse the output. Unfortunately I'm struggling to get this working as I can't figure out how to split out lines from the $backloginfo variable successfully.

    Can anyone think of a way that this may be possible for DFSr members with more than 10 returns from this script?


    Thanks for your help @yaquaholic

  • Alright here is what I did.

    1 - I imported a clean copy of your template and hit edit. 

    2 - Cleared out the 8 or so statistical outputs in your template that were there. 

    3 - Applied it to one of my nodes.

    4 - Set the hostname prop and edit the script.

    Adjusted the text below as the previous user did(I think that is what he did)

           $RepGroupName = $ReplicationFolderName -replace '\s',''

           $title = "$RepGroupName$direction"

           Write-Output "Statistic.$title : $BacklogCount"

           Write-Output "Message.$title : $Smem -> $Rmem  (RGName = $ReplicationGroupName and RFName = $ReplicatedFolderName)"

    5 - Hit get script output and let them generate new outputs based on my environment.

    6 - Confirmed it found them all and created new statistical outputs.

    7 - Saved.

  • Add this to the script, somehwere near the top

    $creds = Get-Credential

    And then replace "${Credential}" for "$creds" anywhere you find it in the script.

    That way it will prompt for the user credentails at the begining and use them through the test. You will need to re-enter them eachtime you rnun the script.

    Or alternatively, log into the server using the monitoring account and remove "-Credential ${Credential}" where ever you find it in the PowerShell script.

    Hope it helps...

  • Have you tried torubleshooting with the PowerShell script locally on the server you are trying to monitor, as I suggested?

    All of the parameters you mentioned are taken from the $title variable, so it is your system that is providing them not the script.