Skip to content

PRTG Sensor for monitoring the Windows spooler service through a dummy printer device

License

Notifications You must be signed in to change notification settings

joxz/prtg_sensor-spooler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

prtg_sensor-spooler

Checks if the Windows spooler service is working by printing a test page to a NUL printer.

When you send jobs to a NUL printer, files leave the spool as if they are being printed, but are deleted instead.

For this sensor to work, a dummy printer has to be installed on the target print server:

$cred = Get-Credential
$SessionParams = @{}
$SessionParams.ComputerName = "printsrv01"

# if no WinRM enabled on the target server use DCOM
$SessionParams.SessionOption = (New-CimSessionOption -Protocol DCOM)

$session = New-CimSession @SessionParams -Credential $cred

Add-Printerport -Cimsession $session -Name "NUL:"
Add-Printer -Cimsession $session -Name "MyDummyPrinter" -Drivername "Microsoft XPS Document Writer v4" -Portname "NUL:"

Environment Variables

prtg_host - set by PRTG when using Set placeholders as environment variables in the sensor settings

cimprotocol - sets the protocol to use with the New-Cimsession cmdlet (DCOM, WSMAN; defaults to WSMAN)

Parameters

printer - sets the printer name (default: MyDummyPrinter)

About

PRTG Sensor for monitoring the Windows spooler service through a dummy printer device

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published