I was trying to set up a sensor to monitor CAS login system. Can't seem to figure it out. I tried using HTTP Transaction sensor. Any help will be much appreciated!


Article Comments

What kind of a login is this and how do you have the sensor set up? Most form Authentication methods won't work with that or any other sensor in PRTG but basic, NTLM and some form authentication methods will work if they are POST data based.


Jan, 2015 - Permalink

http://serverfault.com/questions/663492/monitoring-cas-login-system


Jan, 2015 - Permalink

Are you trying to monitor 2010 Exchange or 2013?


Feb, 2015 - Permalink

No, I am just trying to monitor login system. We've a lot of applications authenticated by Central Authentication System(CAS). CAS uses ADFS to verify username and password.

For example: LDAP can be used verify a lot of applications. Instead of LDAP, we use CAS+ADFS. I have some applications that is authenticated using LDAP and it is pretty straightforward. But with CAS+ADFS, there are lots of redirection and cookies involved.


Feb, 2015 - Permalink

The problem is that the HTTP sensors cannot handle redirects at this time. We have a Powershell script here that we wrote to allow you to monitor 2013 exchange with a redirect so you may be able to adapt this to your purposes but the standard HTTP sensors in PRTG will not work.

<scriptname> -hostname "<server>" -user "<user as domain\username>" -password "<password>"

Param(
    [string]$hostname,                                   
    [string]$username,   # as 'domain\username'
    [string]$password,
    [boolean]$test = $false
    )

if ($test) {
. $env:HOMEPATH\testcred.ps1
}


$destination="https://$($hostname)/owa/";
$response = '';
$postParams = @{
    destination="$destination";
    flags='0';
    forcedownlevel='0';
    trusted='0'
    username="$($username)";
    password="$($password)";
    isUtf8='1'
}

$url = "$($destination)auth.owa"

$response = Invoke-WebRequest -uri $url -Method POST -body $postParams

if ($response.content.Contains('Try entering it again')) {
    write-host 'password failed or Exchange2010'
} elseif ($response.content.Contains('Connected to Microsoft Exchange')) {
    write-host '1:success'
} else {
    write-host '0:failed'
}

Feb, 2015 - Permalink