Skip to content

clcdpc/prtg-powershell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

PRTG Scripts

This repository contains custom PowerShell scripts for use with the PRTG monitoring system.

Scripts

Get-TwilioNumberInfo.ps1

This script performs a Twilio lookup to verify the Caller Name (CNAM) of a given phone number. It is designed to be used as a Custom EXE/Script Sensor in PRTG.

Purpose

The script checks if the CNAM returned by the Twilio Lookup API v2 matches an expected value. This is useful for monitoring that phone numbers are correctly provisioned with the desired Caller ID.

Parameters

  • PhoneNumber (string, Mandatory): The phone number to look up in E.164 format (e.g., +15551234567).
  • ExpectedCnam (string, Mandatory): The expected CNAM value to be returned by Twilio.
  • AccountSid (string, Mandatory): Your Twilio Account SID.
  • AuthToken (string, Mandatory): Your Twilio Auth Token.
  • PRTG (switch): If present, the script formats the output as XML suitable for a PRTG sensor.

Example Usage

  • Manual Execution:

    ./Get-TwilioNumberInfo.ps1 -PhoneNumber "+15551234567" -ExpectedCnam "John Doe" -AccountSid "ACxxxxxxxxxxxx" -AuthToken "your_auth_token"
  • PRTG Sensor: When used in PRTG, you would typically pass the host field or a custom variable for the phone number. Get-TwilioNumberInfo.ps1 -PhoneNumber "%host" -ExpectedCnam "Your Expected CNAM" -AccountSid "ACxxxxxxxxxxxx" -AuthToken "your_auth_token" -PRTG


check-innreacherrors.ps1

This script queries a Polaris database to check for recent errors in the Inn-Reach system integration. It is also designed to be used as a PRTG sensor.

Purpose

The script identifies failed API transactions between Polaris and Inn-Reach by looking for HTTP response codes that are not in a success list. This allows for proactive monitoring of the integration.

Parameters

  • server (string, Default: "proddb"): The name of the SQL server to connect to.
  • ignoredMessageNumbers (int[], Default: @(101, 502)): An array of Inn-Reach message numbers to ignore when checking for errors.
  • days_to_check (int, Default: 7): The number of past days to check for errors.
  • successResponseCodes (int[], Default: @(200)): An array of HTTP status codes that are considered successful. Any other code will be treated as an error.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors