Contact Info

ActiveXperts Network Monitor ships with a powerful set of pre-defined checks. Each individual check has a static number of configuration items. To monitor other items, or to combine monitoring items, you can make use of custom PowerShell checks.

Most of the built-in checks have a PowerShell equivalent, implemented as a PowerShell (.ps1) script file. Out-of-the-box, each PowerShell script monitors the same items as the built-in check. Feel free to modify the script.

To add a new PowerShell-based RADIUS monitoring check, do the following:

To customize the above monitoring check, click on the 'Edit button' next to the 'Script File' selection box. Notepad will be launched. You can now make changes to the PowerShell script.

Screenshot of a Powershell RADIUS check

Radius.ps1 script source code

#################################################################################
# ActiveXperts Network Monitor PowerShell script, (c) ActiveXperts Software B.V.
# For more information about ActiveXperts Network Monitor, visit the ActiveXperts 
# Network Monitor web site at https://www.activexperts.com
#################################################################################
# Script
#     Radius.ps1
# Description:
#     Check a RADIUS server for accessibility
#     This function uses the ActiveXperts Network Component, an ActiveXperts product.
#     ActiveXperts Network Component is automatically licensed when ActiveXperts 
#     Network Monitor is purchased
#     For more information about ActiveXperts Network Component, see: 
#       www.activexperts.com/network-component
# Parameters:
#     1) strHost - Host name or IP address of the RADIUS server
#     2) strUser - RADIUS User
#     3) strPassword - Password of the RADIUS user
#     4) strSecret - RADIUS secret
# Usage:
#     .\Radius '<Host>' '<User>' '<Password>' '<Secret>'
# Sample:
#     .\Radius '10.1.1.100' 'johndoe' 'mypassword' 'mysecret'
#################################################################################

# Parameters
param
  (
    [string]$strHost,
    [string]$strUser,
    [string]$strPassword,
    [string]$strSecret
  )

cls


# Check parameters input
if ( ([string]$strHost -eq "" ) -or ( [string]$strUser -eq "" ) -or ( $strPassword -eq "" ) -or ( $strSecret -eq "" ) )
{
  $res = "UNCERTAIN: Invalid number of parameters - Usage: .\CheckRadius.ps1 <Host> <User> <Password> <Secret> [alt-credentials]"
  echo $res
  exit
}

if( $colCpu -eq $null )
  {
    $res = "UNCERTAIN: Unable to connect. Please make sure that PowerShell and WMI are both installed on the monitered system. Also check your credentials"
    echo $res
    exit
  }

#################################################################################
# THE SCRIPT ITSELF
#################################################################################
 
$objRadius = new-object -comobject ActiveXperts.Radius

# Use default port 1812
$objRadius.Port           = 1812

# Login
$objRadius.CheckAccess($strHost, $strUser, $strPassword, $strSecret)

if ( $objRadius.LastError -eq 0 )
{
  return "SUCCESS: ADIUS server accessible DATA: 1"
}  
else
{
  return "ERROR: Failed to access RADIUS server; result=[" + $objRadius.LastError + ": " + $objRadius.GetErrorDescription( $objRadius.LastError ) + "] DATA: 0"
}