Hi I need to monitor a new directaccess server with the directaccess role itself, as well as de Certificate Authority Service on a different server. do you know how I get these roles in prtg?

thank you kevin


Article Comments

Dear kevingmeier

There is no dedicated PRTG sensor, however you could use an Exe/Script Advanced sensor with a powershell script:

Param(
    $server
)
$servicehealth = invoke-command -computer $server {Get-RemoteAccessHealth -verbose | Where {$_.HealthState -ne "Disabled"}} | select component, healthstate
$prtg = '<?xml version="1.0" encoding="Windows-1252" ?> 
<prtg> 
'  
$servicehealth | %{
    $state = switch ($_.healthstate)
    {
        "Disabled" {0}
        "OK"       {1}
        "Error"    {2}
        "Warning"  {3}
        "Unknown"  {4}
    }
    $prtg +="  <result> 
    <channel>$($_.component)</channel> 
    <value>$($state)</value> 
    <unit>custom</unit>
    <customunit>state</customunit>
    <showChart>1</showChart> 
    <showTable>1</showTable>
    <valuelookup>prtg.microsoft.RemoteAcccesshealthstate</valuelookup>
  </result> 
"
}

$prtg +="  <text>OK</text> 
</prtg>" 
$prtg

The channels then need the according lookup file prtg.microsoft.RemoteAcccesshealthstate.ovl in the \lookups\custom subfolder:

<?xml version="1.0" encoding="UTF-8"?>
  <ValueLookup id="prtg.microsoft.RemoteAcccesshealthstate" desiredValue="1" undefinedState="Warning" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd">
    <Lookups>
      <SingleInt state="None" value="0">
        disabled
      </SingleInt>
      <SingleInt state="OK" value="1">
        OK
      </SingleInt>
      <SingleInt state="Error" value="2">
        Error
      </SingleInt>
      <SingleInt state="Warning" value="3">
        warning
      </SingleInt>
      <SingleInt state="None" value="4">
        unknown
      </SingleInt>
    </Lookups>
  </ValueLookup>

To make the ovl file effective, please go to Setup / System Administration / Administrative Tools, and reload the lookups.

Please note that we provide this content as is, with no further technical support. To monitor the CA server, you could monitor those services, and the HTTPS server with another sensor. You can could create a Business Process Sensor to create a consolidated view.


Mar, 2017 - Permalink

I am trying to set this up in my environment as well and when I created the new sensor I get an error on the sensor that says "XML: The channel name must not be empty. (code PE242)

On the probe I created a DA-Servers.ps1 file and copied and pasted your text into it.

I then created the prtg.microsoft.RemoteAccesshealthstate.ovl and copied and pasted your text into it and saved in in the lookups/custom folder.

What am I doing wrong here?


Apr, 2017 - Permalink

Dear Jon

Please go to the sensor settings and enable the setting "Write Exe result to disk". You find the log file in ""C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)." Please check the XML written by the sensor. Can you determine the cause of the error using the log output?


May, 2017 - Permalink

I found out that you can monitor single services from a windows client. so i'm now monitoring the services themself to check either their running or not. further i put the eventlog on a sensor as well so get notifications when a problem occurs.

well you're solutions might get better results than mine, so i might gonna try this too, since we're rebuilding the whole domain...


May, 2017 - Permalink

Hi all. Is there any way to monitor the total amount of direct access clients/sessions? Thanks, Flavio.


Jun, 2018 - Permalink

Dear FlavioB,

it might be possible, but we don't offer an example script.


Jun, 2018 - Permalink