New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Windows backup monitoring - how to and where's the new sensor?

Votes:

0

Your Vote:

Up

Down

I'm pretty sure I read in some release notes, that there is a new sensor for monitoring windows backups. Searching the KB, I see some posts regarding various methods, but most of these are late 2011.

What's the current best way to do this? Note I'm looking for monitoring and email alerts of the NATIVE Windows Backup system - not a 3rd party tool.

Thanks! :-D

backup custom-script-exe prtg windows windows-backup

Created on Jun 12, 2012 3:35:59 PM by  Matthew Day (0) 1

Last change on Jun 17, 2016 6:09:39 AM by  Luciano Lingnau [Paessler Support]



7 Replies

Votes:

0

Your Vote:

Up

Down

This is done via the newly implemented "Process Email Content" option of the IMAP sensor.

Please have a look at IMAP sensor manual page.

Created on Jun 13, 2012 8:38:59 AM by  Dirk Paessler [Founder Paessler AG] (10,869) 3 4



Votes:

0

Your Vote:

Up

Down

Thanks Dirk - so this is basically no good for Windows Backup, as it doesn't have any native email reporting?

Unless there's a way to convert an event log entry into an email?

Sorry I am new to PRTG :)

Thanks again,

Matt

Created on Jun 13, 2012 1:52:00 PM by  Matthew Day (0) 1



Votes:

0

Your Vote:

Up

Down

The new sensor can only work with emails, sorry. You could use the Event Log sensor to watch for "failed" events of Windows Backup, I assume.

Created on Jun 14, 2012 11:22:27 AM by  Dirk Paessler [Founder Paessler AG] (10,869) 3 4



Votes:

1

Your Vote:

Up

Down

Hi There

I have written a PowerShell script which you can use for the extended script sensor. You only need to specify the '%host' variable in the sensor settings. The sensor extracts the backup events and the time since last backup has run. The script is tested on a Windows Server 2012R2 using the built-in backup tool.

param([string]$hostname = "N/A")

Invoke-Command -ComputerName $hostname{
$today=(Get-Date)
$dateshift=(Get-Date).AddHours(-24)
$EventError=Get-WinEvent -LogName Microsoft-Windows-Backup| Where-Object {$_.TimeCreated -gt $dateshift} | Where-Object {$_.LevelDisplayName -eq "Error"}
$EventWarning=Get-WinEvent -LogName Microsoft-Windows-Backup| Where-Object {$_.TimeCreated -gt $dateshift} | Where-Object {$_.LevelDisplayName -eq "Warning"}
$EventOK=Get-WinEvent -LogName Microsoft-Windows-Backup| Where-Object {$_.TimeCreated -gt $dateshift} | Where-Object {$_.LevelDisplayName -eq "Information"}

$backupsets=Get-WBBackupSet
$lastbackup=(Get-Date)-($backupsets.BackupTime |Measure-Object -Maximum |Select-Object -ExpandProperty Maximum)
$lastbkround=[math]::Floor($lastbackup.TotalHours)

Write-Host '<?xml version="1.0" encoding="Windows-1252" ?>'
Write-Host '<prtg>'
Write-Host '<result>'
Write-Host '<channel>Error Events</channel>'
Write-Host '<value>'$EventError.Count'</value>'
Write-Host '</result>'
Write-Host '<result>'
Write-Host '<channel>Warning Events</channel>'
Write-Host '<value>'$EventWarning.Count'</value>'
Write-Host '</result>'
Write-Host '<result>'
Write-Host '<channel>Information Events</channel>'
Write-Host '<value>'$EventOK.Count'</value>'
Write-Host '</result>'
Write-Host '<result>'
Write-Host '<channel>Hours Since Last Backup</channel>'
Write-Host '<value>'$lastbkround'</value>'
Write-Host '</result>'
Write-Host '</prtg>'

Created on Jun 16, 2016 7:53:38 PM by  Liceo (10) 1

Last change on Jun 17, 2016 6:09:02 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Liceo, thank you for sharing your script!

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Jun 17, 2016 6:10:39 AM by  Luciano Lingnau [Paessler Support]

Last change on Jun 17, 2016 6:11:00 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Liceo, is your script missing a "}" somewhere? I'm getting an error executing it manually.

Also, do you run it in the default security context?

Created on Aug 19, 2016 4:37:12 PM by  robles (0)



Votes:

0

Your Vote:

Up

Down

You could also try Heath Trengove's powershell sensor from GitHub: https://github.com/htrengove/PRTGwindowsbackup/

Thanks, Heath!

Created on Nov 2, 2016 3:38:15 PM by  Kimberley Trommler [Paessler Support]

Last change on Nov 2, 2016 3:56:49 PM by  Kimberley Trommler [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.