Hello,

We have a DFS Namespace deployed. We need to monitor its availability on several servers.

I've found something on DFS Replication but i need something on the DFS Namespace.


Article Comments

Hello,

thank you very much for your KB-Post. I'm very much afraid we do not have native sensors for this in PRTG. Please consider writing a script for this, and then running it as a Custom Sensor.

best regards.


Jul, 2014 - Permalink

Hello,

Thanks for your reply.

I have created a PowerShell Script :

cls
$ErrorActionPreference = 'SilentlyContinue'
if (Test-Path -Path \\groupesifa.com\societe)
{
    $Count = (Get-ChildItem -Path \\groupesifa.com\societe -Force).Count
    if ($Count -gt 0)
    {
        $Result = [string]$Count+":OK"
         write-host $Result
         Exit 0
    }
    else
    {
        $Result = "0:Invalid"
         write-host $Result
         Exit 2

    }
}
else
{
    write-host "0:Invalid"
    Exit 2

}

This script show the number of folder in the DFS NameSpace
groupesifa.com\societe

When i test, i have the following result : 20:OK

But PRTG Custom Sensor show me execution time and the value is still 0

Any Help ?


Jul, 2014 - Permalink

It may help to run the PRTG Probe Service under your account then. Or try impersonating the script to have PRTG run it under your account. Maybe the "LOCAL SYSTEM"-Account (default setting for PRTG) does not see the counter, and thus results in 0.


Jul, 2014 - Permalink

Hello,

I've changed the service account on the test machine. But the value is still 0 I've tried to changed the setting to use the herited credentials in the sensor but no change.


Jul, 2014 - Permalink

Hello,

I'm still having the same probelm. Any help please ?


Aug, 2014 - Permalink

Can you please have the sensor write the result to disk and post that here?


Aug, 2014 - Permalink

Hello,

On linux I have 3 parameter in write-host.

Like this: echo "0:1:SQL OK"

First is the return value :

  1. 0 -> OK
  2. 1 -> Warning
  3. 2 -> System Error (network/socket error)
  4. 3 -> Protocol Error (web server return a 404 error)
  5. 4 -> Content Error (web page does not contain a required word)

Second are the value want to see in graph. Third are the message.

Try with "0:20:OK"


Feb, 2015 - Permalink