Hello,
we use Version 1.6.0p23 Managed Services Edition. We have build the following custom check:
When we run this Powershell script manually we get this output:
$BacklogDC1ToDC2 = (Get-DfsrBacklog -GroupName “mygroup” -FolderName “myfolder” -SourceComputerName “DC1” -DestinationComputerName “DC2” -Verbose 4>&1).Message.ToString()
$BacklogDC2toDC1 = (Get-DfsrBacklog -GroupName “mygroup” -FolderName “myfolder” -SourceComputerName “DC2” -DestinationComputerName “DC1” -Verbose 4>&1).Message.ToString()
$CheckMKStatus = 0
$CheckMKMessage = “Backlog ok”
$WarnLimit = 25
$CritLimit = 50
$BacklogDC1ToDC2Count = 0
$BacklogDC2toDC1Count = 0
$BacklogCount = 0
if ($BacklogDC1ToDC2.ToLower().Contains(“count”)){
$BacklogDC1ToDC2Count = [int]$BacklogDC1ToDC2.Split(’:’)[2]
}
if ($BacklogDC2toDC1.ToLower().Contains(“count”)){
$BacklogDC2toDC1Count = [int]$BacklogDC2toDC1.Split(’:’)[2]
}
if ($BacklogDC1ToDC2Count -ge $WarnLimit -or $BacklogDC2toDC1Count -ge $WarnLimit){
$CheckMKStatus = 1
$CheckMKMessage = “Backlog higher than normal. Check Diagnostic Report.”
if ($BacklogDC1ToDC2Count -ge $CritLimit -or $BacklogDC2toDC1Count -ge $CritLimit){
$CheckMKStatus = 2
$CheckMKMessage = "Backlog too high. Check Diagnostic Report."
}
}
if ($BacklogDC1ToDC2Count -ge $BacklogDC2toDC1Count){
$BacklogCount = $BacklogDC1ToDC2Count
}
else {
$BacklogCount = $BacklogDC2toDC1Count
}
“$CheckMKStatus DFS_Backlog_myfolder - Backlog file count is: $BacklogCount - $CheckMKMessage”
exit 0
When we check the output from Powershell-Script we get this output:
0 DFS_Backlog_myfolder - Backlog file count is: 3 - Backlog ok
When we check the output from the agent, we get this output:
0 DFS_Backlog_myfolder - Backlog file count is: 3 - Backlog ok
When we start this check from the CHECK_MK-Server we get this output:
0 DFS_Backlog_myfolder - Backlog file count is: 0 - Backlog ok
Changes to the backlog filecount are reflected on agent side, but not on server side.
Has anyone an idea what might be missing?
Regards,
Michael