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


Monitoring Veeam Backup & Replication Without Veeam Enterprise Manager

Votes:

0

Your Vote:

Up

Down

Markus Kraus of My Cloud-(R)evolution has written an excellent article on monitoring Veeam Backup and Replication using PRTG without needing to use the Veeam Enterprise Manager.

His article is available here: http://mycloudrevolution.com/2016/03/21/veeam-prtg-sensor-reloaded/

Since the original article is in German, Markus has kindly agreed to let us offer an English version of the article in the Knowledge Base.

If you’re already using the Veeam Enterprise Backup Manager, you may also be interested in this article, which explains how to monitor Veeam using Enterprise Manager.

custom-sensor powershell veeam

Created on Nov 9, 2016 12:57:01 PM by  Kimberley Trommler [Paessler Support]

Last change on Nov 9, 2016 1:05:09 PM by  Kimberley Trommler [Paessler Support]



21 Replies

Votes:

0

Your Vote:

Up

Down

DISCLAIMER: This CUSTOM SENSOR and its underlying script was made by http://mycloudrevolution.com/. We ONLY translated the how-to into English. For any question to this approach, please get in contact with https://github.com/mycloudrevolution/Advanced-PRTG-Sensors/

Veeam PRTG Sensor Reloaded

Thanks for all the feedback on my PRTG – Veeam B & R Monitoring article. It’s become clear to me that Veeam Enterprise Server and its RESTful API isn’t as widespread as I thought. So, I’ve created a new version of my PRTG Veeam Advanced Sensor – the Veeam PRTG Sensor Reloaded.

http://mycloudrevolution.com/wp-content/uploads/2016/03/Veeam-Session_V3.png

Requirements for the new sensor:

  • Use the Veeam Powershell Snapin
  • Take the target server (Veeam B&R server) as a parameter
  • Report on repository usage
  • Simple to extend

I quickly ran into a fundamental problem when using the Veeam Powershell Snapin in conjunction with PRTG:

The Veeam PowerShell Plugin is 64-bit only, but PRTG runs all scripts on the probe in 32-bit only.

After some research and testing, I found the PSx64 tool from PRTG Tools Family (@prtgtoolsfamily), which has proven to be a good and robust solution.

Veeam PRTG Sensor Reloaded – Configuration

The PSx64 tool is added to PRTG as an EXE/Script Advanced sensor:

http://mycloudrevolution.com/wp-content/uploads/2016/03/prtg-sensor-neu-v2.png

You can also include parameters, for example, the FQDN of the Veeam B&R server:

http://mycloudrevolution.com/wp-content/uploads/2016/03/prtg-sensor-mit-parameter-neu.png

Parameters for the PSx64.exe:

-f= PowerShell Script -p= Parameter für das Script – z.B. „-BRHost veeam01.lan.local“

Since the script requires powershell session credentials to set up the connection to the Veeam Backup & Recovery Server, these credentials need to be entered into PRTG, and then you need to use the option “use Windows credentials of parent device”.

THE SCRIPT

Note: The script below is cut-and-paste from GitHub. To get a copy of the most recent version, use this GitHub Gist

<#
        .SYNOPSIS
        PRTG Veeam Advanced Sensor
  
        .DESCRIPTION
        Advanced Sensor will Report Statistics about Backups during last 24 Hours and Actual Repository usage.
        
        .EXAMPLE
        PRTG-VeeamBRStats.ps1 -BRHost veeam01.lan.local
        .EXAMPLE
        PRTG-VeeamBRStats.ps1 -BRHost veeam01.lan.local -reportmode "Monthly" -repoCritical 80 -repoWarn 70 -Debug
 
        .Notes
        NAME:  PRTG-VeeamBRStats.ps1
        LASTEDIT: 08/09/2016
        VERSION: 1.3
        KEYWORDS: Veeam, PRTG
   
        .Link
        http://mycloudrevolution.com/
 
 #Requires PS -Version 3.0
 #Requires -Modules VeeamPSSnapIn    
 #>
[cmdletbinding()]
param(
    [Parameter(Position=0, Mandatory=$false)]
        [string] $BRHost = "veeam01.lan.local",
    [Parameter(Position=1, Mandatory=$false)]
        $reportMode = "24", # Weekly, Monthly as String or Hour as Integer
    [Parameter(Position=2, Mandatory=$false)]
        $repoCritical = 10,
    [Parameter(Position=3, Mandatory=$false)]
        $repoWarn = 20
  
)

# Big thanks to Shawn, creating a awsome Reporting Script:
# http://blog.smasterson.com/2016/02/16/veeam-v9-my-veeam-report-v9-0-1/

#region: Start Load VEEAM Snapin (if not already loaded)
if (!(Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue)) {
 if (!(Add-PSSnapin -PassThru VeeamPSSnapIn)) {
  # Error out if loading fails
  Write-Error "`nERROR: Cannot load the VEEAM Snapin."
  Exit
 }
}
#endregion

#region: Functions
Function Get-vPCRepoInfo {
[CmdletBinding()]
        param (
                [Parameter(Position=0, ValueFromPipeline=$true)]
                [PSObject[]]$Repository
                )
        Begin {
                $outputAry = @()
                Function Build-Object {param($name, $repohost, $path, $free, $total)
                        $repoObj = New-Object -TypeName PSObject -Property @{
                                        Target = $name
          RepoHost = $repohost
                                        Storepath = $path
                                        StorageFree = [Math]::Round([Decimal]$free/1GB,2)
                                        StorageTotal = [Math]::Round([Decimal]$total/1GB,2)
                                        FreePercentage = [Math]::Round(($free/$total)*100)
                                }
                        Return $repoObj | Select Target, RepoHost, Storepath, StorageFree, StorageTotal, FreePercentage
                }
        }
        Process {
                Foreach ($r in $Repository) {
                 # Refresh Repository Size Info
     [Veeam.Backup.Core.CBackupRepositoryEx]::SyncSpaceInfoToDb($r, $true)
     
     If ($r.HostId -eq "00000000-0000-0000-0000-000000000000") {
      $HostName = ""
     }
     Else {
      $HostName = $($r.GetHost()).Name.ToLower()
     }
     $outputObj = Build-Object $r.Name $Hostname $r.Path $r.info.CachedFreeSpace $r.Info.CachedTotalSpace
     }
                $outputAry += $outputObj
        }
        End {
                $outputAry
        }
}
#endregion

#region: Start BRHost Connection
Write-Output "Starting to Process Connection to $BRHost ..."
$OpenConnection = (Get-VBRServerSession).Server
if($OpenConnection -eq $BRHost) {
 Write-Output "BRHost is Already Connected..."
} elseif ($OpenConnection -eq $null ) {
 Write-Output "Connecting BRHost..."
 Connect-VBRServer -Server $BRHost
} else {
    Write-Output "Disconnection actual BRHost..."
    Disconnect-VBRServer
    Write-Output "Connecting new BRHost..."
    Connect-VBRServer -Server $BRHost
}

$NewConnection = (Get-VBRServerSession).Server
if ($NewConnection -eq $null ) {
 Write-Error "`nError: BRHost Connection Failed"
 Exit
}
#endregion

#region: Convert mode (timeframe) to hours
If ($reportMode -eq "Monthly") {
        $HourstoCheck = 720
} Elseif ($reportMode -eq "Weekly") {
        $HourstoCheck = 168
} Else {
        $HourstoCheck = $reportMode
}
#endregion

#region: Collect and filter Sessions
# $vbrserverobj = Get-VBRLocalhost        # Get VBR Server object
# $viProxyList = Get-VBRViProxy           # Get all Proxies
$repoList = Get-VBRBackupRepository     # Get all Repositories
$allSesh = Get-VBRBackupSession         # Get all Sessions (Backup/BackupCopy/Replica)
# $allResto = Get-VBRRestoreSession       # Get all Restore Sessions
$seshListBk = @($allSesh | ?{($_.CreationTime -ge (Get-Date).AddHours(-$HourstoCheck)) -and $_.JobType -eq "Backup"})           # Gather all Backup sessions within timeframe
$seshListBkc = @($allSesh | ?{($_.CreationTime -ge (Get-Date).AddHours(-$HourstoCheck)) -and $_.JobType -eq "BackupSync"})      # Gather all BackupCopy sessions within timeframe
$seshListRepl = @($allSesh | ?{($_.CreationTime -ge (Get-Date).AddHours(-$HourstoCheck)) -and $_.JobType -eq "Replica"})        # Gather all Replication sessions within timeframe
#endregion

#region: Collect Jobs
# $allJobsBk = @(Get-VBRJob | ? {$_.JobType -eq "Backup"})        # Gather Backup jobs
# $allJobsBkC = @(Get-VBRJob | ? {$_.JobType -eq "BackupSync"})   # Gather BackupCopy jobs
# $repList = @(Get-VBRJob | ?{$_.IsReplica})                      # Get Replica jobs
#endregion

#region: Get Backup session informations
$totalxferBk = 0
$totalReadBk = 0
$seshListBk | %{$totalxferBk += $([Math]::Round([Decimal]$_.Progress.TransferedSize/1GB, 0))}
$seshListBk | %{$totalReadBk += $([Math]::Round([Decimal]$_.Progress.ReadSize/1GB, 0))}
#endregion

#region: Preparing Backup Session Reports
$successSessionsBk = @($seshListBk | ?{$_.Result -eq "Success"})
$warningSessionsBk = @($seshListBk | ?{$_.Result -eq "Warning"})
$failsSessionsBk = @($seshListBk | ?{$_.Result -eq "Failed"})
$runningSessionsBk = @($allSesh | ?{$_.State -eq "Working" -and $_.JobType -eq "Backup"})
$failedSessionsBk = @($seshListBk | ?{($_.Result -eq "Failed") -and ($_.WillBeRetried -ne "True")})
#endregion

#region:  Preparing Backup Copy Session Reports
$successSessionsBkC = @($seshListBkC | ?{$_.Result -eq "Success"})
$warningSessionsBkC = @($seshListBkC | ?{$_.Result -eq "Warning"})
$failsSessionsBkC = @($seshListBkC | ?{$_.Result -eq "Failed"})
$runningSessionsBkC = @($allSesh | ?{$_.State -eq "Working" -and $_.JobType -eq "BackupSync"})
$IdleSessionsBkC = @($allSesh | ?{$_.State -eq "Idle" -and $_.JobType -eq "BackupSync"})
$failedSessionsBkC = @($seshListBkC | ?{($_.Result -eq "Failed") -and ($_.WillBeRetried -ne "True")})
#endregion

#region: Preparing Replicatiom Session Reports
$successSessionsRepl = @($seshListRepl | ?{$_.Result -eq "Success"})
$warningSessionsRepl = @($seshListRepl | ?{$_.Result -eq "Warning"})
$failsSessionsRepl = @($seshListRepl | ?{$_.Result -eq "Failed"})
$runningSessionsRepl = @($allSesh | ?{$_.State -eq "Working" -and $_.JobType -eq "Replica"})
$failedSessionsRepl = @($seshListRepl | ?{($_.Result -eq "Failed") -and ($_.WillBeRetried -ne "True")})

$RepoReport = $repoList | Get-vPCRepoInfo | Select     @{Name="Repository Name"; Expression = {$_.Target}},
                                                       @{Name="Host"; Expression = {$_.RepoHost}},
                                                       @{Name="Path"; Expression = {$_.Storepath}},
                                                       @{Name="Free (GB)"; Expression = {$_.StorageFree}},
                                                       @{Name="Total (GB)"; Expression = {$_.StorageTotal}},
                                                       @{Name="Free (%)"; Expression = {$_.FreePercentage}},
                                                       @{Name="Status"; Expression = {
                                                       If ($_.FreePercentage -lt $repoCritical) {"Critical"} 
                                                       ElseIf ($_.FreePercentage -lt $repoWarn) {"Warning"}
                                                       ElseIf ($_.FreePercentage -eq "Unknown") {"Unknown"}
                                                       Else {"OK"}}} | `
                                                       Sort "Repository Name" 
#endregion

#region: XML Output for PRTG
Write-Host "<prtg>" 
$Count = $successSessionsBk.Count
Write-Host "<result>"
               "<channel>Successful-Backups</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>"
$Count = $warningSessionsBk.Count
Write-Host "<result>"
               "<channel>Warning-Backups</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxWarning>0</LimitMaxWarning>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $failsSessionsBk.Count
Write-Host "<result>"
               "<channel>Failes-Backups</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxError>0</LimitMaxError>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $failedSessionsBk.Count
Write-Host "<result>"
               "<channel>Failed-Backups</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxError>0</LimitMaxError>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $runningSessionsBk.Count
Write-Host "<result>"
               "<channel>Running-Backups</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>" 

$Count = $successSessionsBkC.Count
Write-Host "<result>"
               "<channel>Successful-BackupCopys</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>"
$Count = $warningSessionsBkC.Count
Write-Host "<result>"
               "<channel>Warning-BackupCopys</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxWarning>0</LimitMaxWarning>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $failsSessionsBkC.Count
Write-Host "<result>"
               "<channel>Failes-BackupCopys</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxError>0</LimitMaxError>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $failedSessionsBkC.Count
Write-Host "<result>"
               "<channel>Failed-BackupCopys</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxError>0</LimitMaxError>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $runningSessionsBkC.Count
Write-Host "<result>"
               "<channel>Running-BackupCopys</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>" 
$Count = $IdleSessionsBkC.Count
Write-Host "<result>"
               "<channel>Idle-BackupCopys</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>" 

$Count = $successSessionsRepl.Count
Write-Host "<result>"
               "<channel>Successful-Replications</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>"
$Count = $warningSessionsRepl.Count
Write-Host "<result>"
               "<channel>Warning-Replications</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxWarning>0</LimitMaxWarning>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $failsSessionsRepl.Count
Write-Host "<result>"
               "<channel>Failes-Replications</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxError>0</LimitMaxError>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $failedSessionsRepl.Count
Write-Host "<result>"
               "<channel>Failed-Replications</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxError>0</LimitMaxError>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
$Count = $runningSessionsRepl.Count
Write-Host "<result>"
               "<channel>Running-Replications</channel>"
               "<value>$Count</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>" 

Write-Host "<result>"
               "<channel>TotalBackupRead</channel>"
               "<value>$totalReadBk</value>"
               "<unit>Custom</unit>"
               "<customUnit>GB</customUnit>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>" 
Write-Host "<result>"
               "<channel>TotalBackupTransfer</channel>"
               "<value>$totalxferBk</value>"
               "<unit>Custom</unit>"
               "<customUnit>GB</customUnit>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "</result>" 

foreach ($Repo in $RepoReport){
$Name = "REPO - " + $Repo."Repository Name"
$Free = $Repo."Free (%)"
Write-Host "<result>"
               "<channel>$Name</channel>"
               "<value>$Free</value>"
               "<unit>Percent</unit>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMinWarning>20</LimitMinWarning>"
               "<LimitMinError>10</LimitMinError>"
               "<LimitMode>1</LimitMode>"
               "</result>" 
 }
Write-Host "</prtg>" 
#endregion

#region: Debug
if ($DebugPreference -eq "Inquire") {
 $RepoReport | ft * -Autosize
    
    $SessionObject = [PSCustomObject] @{
     "Successful Backups"  = $successSessionsBk.Count
     "Warning Backups" = $warningSessionsBk.Count
     "Failes Backups" = $failsSessionsBk.Count
     "Failed Backups" = $failedSessionsBk.Count
     "Running Backups" = $runningSessionsBk.Count
     "Warning BackupCopys" = $warningSessionsBkC.Count
     "Failes BackupCopys" = $failsSessionsBkC.Count
     "Failed BackupCopys" = $failedSessionsBkC.Count
     "Running BackupCopys" = $runningSessionsBkC.Count
     "Idle BackupCopys" = $IdleSessionsBkC.Count
     "Successful Replications" = $successSessionsRepl.Count
        "Warning Replications" = $warningSessionsRepl.Count
        "Failes Replications" = $failsSessionsRepl.Count
        "Failed Replications" = $failedSessionsRepl.Count
        "Running Replications" = $RunningSessionsRepl.Count
    }
    $SessionResport += $SessionObject
    $SessionResport
}
#endregion

Special Thanks

Many thanks to Shawn Masterson (@smasterson24) for creating this fantastic Veeam Report, which I used as the basis for this sensor.

New Versions

Version 1.2 – 09.08.2016

  • New: BackupCopy Sessions
  • Improvement: Exclude unused data
  • Improvement: PS Region definitions
  • Improvement: PS Required definitions
  • Tested with Veeam B&R Version 9 Update 1 und Update 2

Version 1.3 – 03.11.2016

  • New: Debug
  • New: additional parameters “-reportmode -repoCritical -repoWarn”
  • Improvement: reorganize the regions

GitHub Repository

I’ve created a GitHub Repository with the most current scripts. I invite you to take part in this project. Whether it’s a pull request, bug report or feature request – all input and participation is welcome.

http://mycloudrevolution.com/wp-content/uploads/2016/03/Advanced-PRTG-Sensors-GitHub.png

DISCLAIMER: This CUSTOM SENSOR and its underlying script was made by http://mycloudrevolution.com/. We ONLY translated the how-to into English. For any question to this approach, please get in contact with https://github.com/mycloudrevolution/Advanced-PRTG-Sensors/

Created on Nov 9, 2016 1:48:01 PM by  Kimberley Trommler [Paessler Support]

Last change on Sep 27, 2017 10:47:29 AM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thank you Markus for the great work! It's a pleasure to monitor our Veeam environment with your powershell sendor.

Is there a minimum version of Veeam Backup & Replication required to run the script?

Created on Jul 13, 2017 1:01:47 PM by  fh2612 (0)



Votes:

0

Your Vote:

Up

Down

Dear team,

Many thanks for this script, this one fully success when my distant probe is on the same server of veeam server. But when my probe is on one server and Veeam on otherone, I have the terrible message "JSON" shema is not correct.

I use this argument is the success exemple: -f="PRTG-VeeamBRStats.ps1" For the 2 different server (PRTG distant and Veeam), I use this one: -f="PRTG-VeeamBRStats.ps1" -p="-BRHost srv-veeam-1.jans.local"

All the orther options are the same (write on disk, ....)

Any idea ?

First, many thanks again :)

Created on Jan 10, 2018 9:28:04 PM by  clecomte (0)



Votes:

0

Your Vote:

Up

Down

Hi there,

Please activate the "Write EXE result to disk" option in the sensor's settings and post the log files (Result of Sensor XXX.Data.txt and Result of Sensor XXX.txt) located on the corresponding probe under "C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)".

Best regards.

Created on Jan 11, 2018 8:48:23 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I am also getting a JSON error on this sensor. The output appears correct when run directly through Powershell, and I get data in my log that is actually my data, but I think there is something wrong with the formatting.

Error in PRTG:

XML: XML Parser mismatch: Wanted , got -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code: PE231)

From my log:

0:\</channel> <value>28</value> <unit>Percent</unit> <showChart>1</showChart> <showTable>1</showTable> <LimitMinWarning>20</LimitMinWarning> <LimitMinError>10</LimitMinError> <LimitMode>1</LimitMode> </result> <result> <channel>REPO - Backup Repository G

From my data log (i removed identifying information and replaced with <>):

Data['blockedsens'].asString := '';
Data['canlinux'].asString := '0';
Data['channelinfos'].asString := '{}';
Data['channelnames'].asString := '';
Data['environment'].asString := '';
Data['exefile'].asString := 'PSx64.exe';
Data['exeparams'].asString := '-f="PRTG-VeeamBRStats.ps1"';
Data['fastcount'].asString := '0';
Data['host'].asString := '<>';
Data['hostv6'].asString := '';
Data['inerror'].asString := '1';
Data['interfacenumber'].asString := '';
Data['inum'].asString := '';
Data['ipversion'].asString := '0';
Data['isexesensor'].asString := '1';
Data['lastmsg'].asString := '#Y2 XML Parser mismatch: Wanted </>, got </channel> @#O231[Invalid JSON.]';
Data['lastuptime'].asString := '0';
Data['linuxlogindomain'].asString := '';
Data['linuxloginpassword'].asString := '***';
Data['monitorchange'].asString := '';
Data['mutexname'].asString := '';
Data['notonpod'].asString := '0';
Data['reboot'].asString := '43110.6750245718';
Data['reqmsginterval'].asString := '60';
Data['resultfile'].asString := 'Result of Sensor 20408.txt';
Data['sensorid'].asString := '20408';
Data['simulate'].asString := '0';
Data['timeout'].asString := '60';
Data['tlsexplicit_default'].asString := '';
Data['tlsexplicit_ftp'].asString := '';
Data['tlsexplicit_imap'].asString := '';
Data['tlsexplicit_pop3'].asString := '';
Data['tlsexplicit_port'].asString := '';
Data['tlsexplicit_smtp'].asString := '';
Data['uptimecount'].asString := '0';
Data['usednstime'].asString := '0';
Data['usewindowsauthentication'].asString := '1';
Data['windowslogindomain'].asString := '<>';
Data['windowsloginpassword'].asString := '***';
Data['windowsloginusername'].asString := '<>';
Data['writeresult'].asString := '1';

Created on Jan 11, 2018 6:12:07 PM by  whijkm (0)

Last change on Jan 11, 2018 6:46:10 PM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi there,

Unfortunately, the output is entirely incorrect. Please note that the output has to begin with "<prtg>" followed by "<result>", like this:

"<prtg>" 
"<result>"
"<channel>Successful-Backups</channel>"
 "<value>$Count</value>"
"<showChart>1</showChart>"
"<showTable>1</showTable>"
"</result>"

Best regards.

Created on Jan 12, 2018 1:39:28 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

That's what I thought, and that is what I get from the script when it is run directly in Powershell. Somewhere along the lines, formatting for PRTG is failing. I guess I need to figure that out. Thanks!

Created on Jan 12, 2018 9:01:34 PM by  whijkm (0)



Votes:

0

Your Vote:

Up

Down

I'm receiving an error when i start the sensor: "Connect-VBRServer : Failed to connect to Veeam Backup & Replication server: Access denied. "

The security context is set to "Use Windows Credentials of Parent Device"

Which user account do i need to use in order to get it running?

R,

Created on Jan 30, 2018 12:46:30 PM by  yschrumpf (0)



Votes:

0

Your Vote:

Up

Down

Hi there,

Have you entered the correct user details in the Windows Credentials of Parent Device?

Best regards.

Created on Jan 31, 2018 8:17:52 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thank for the tip, i overlooked the credentials of the parent device, the script is up and running.

Thank,

Created on Jan 31, 2018 12:43:58 PM by  yschrumpf (0)



Votes:

0

Your Vote:

Up

Down

Thanks Dariusz, it is working.

Does anyone know if its possible to monitor the status of the Backupobject (VM's) rather than the backupjob. We have multiple objects per job and in the currtent situation the status shows failed when one of the backupobjects has failed to create a backup.

R,

Created on Feb 8, 2018 1:05:45 PM by  yschrumpf (0)



Votes:

0

Your Vote:

Up

Down

Hi,

I am using the script but running into an issue. I believe I have everything working correctly.

If I run the script manually from Powershell on the PRTG server, or check the 'result of sensor' log from the PRTG logs folder, I see the expected output

Starting to Process Connection to veeambackupserver.lan.local ...

Connecting BRHost...

<prtg>

<result>

<channel>Successful-Backups</channel>

<value>5</value>

<showChart>1</showChart>

<showTable>1</showTable>

</result>

<result>

<channel>Warning-Backups</channel>

<value>0</value>

<showChart>1</showChart>

<showTable>1</showTable>

<LimitMaxWarning>0</LimitMaxWarning>

<LimitMode>1</LimitMode>

</result>

<result>

...etc, etc.

However, from PRTG console I get error "response not well-formed: "(Starting to process ...etc, etc.

Where am I going wrong? Thanks in advance

Created on Apr 17, 2018 3:16:37 PM by  miyo360 (0) 2

Last change on Apr 17, 2018 5:58:56 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi there,

There must be something in the log that breaks the output. Please activate the "Write EXE result to disk" option in the sensor's settings and post the log files (Result of Sensor XXX.Data.txt and Result of Sensor XXX.txt) located on the corresponding probe under "C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)".

Best regards.

Created on Apr 17, 2018 5:59:35 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello together, I have the problem, that if I want to create the following error:

https://push.schmandre.de/2018-10-09_10:35:18_cfc261be3694455c35c20db4908524ed.png

I have two virtual machines. One with Veeam (X.X.X.105) and one with PRTG (X.X.X.104). (X are just placeholders for IP. In real they are filled with right numbers).

Cause they are not in a domain, I've entered the following parameters at the PRTG Veeam sensors to let PRTG connect to the Veeam machine:

-f="PRTG_VeeamBRStats.ps1" -p="-BRHost X.X.X.105“

and as programm PSx64.exe

I've enabled the powershell by the "Set-ExecutionPolicy RemoteSigned" command.

Now I dont have any ideas to fix the problem )=

Hope anyone has an idea.

Best regards
Schmand_

Created on Oct 9, 2018 8:40:24 AM by  André Brückmann (0)

Last change on Oct 9, 2018 8:56:48 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Anré,

The same is valid as for the posters before. :)

Please activate the "Write EXE result to disk" option in the sensor's settings and post the log files (Result of Sensor XXX.Data.txt and Result of Sensor XXX.txt) located on the corresponding probe under "C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)".

Best regards.

Created on Oct 9, 2018 8:57:42 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Data['blockedsens'].asString := '';
Data['canlinux'].asString := '0';
Data['channelinfos'].asString := '{}';
Data['channelnames'].asString := '';
Data['environment'].asString := '';
Data['exefile'].asString := 'PSx64.exe';
Data['exeparams'].asString := '-f="PRTG_VeeamBRStats.ps1" -p="-BRHost 192.168.0.105“';
Data['fastcount'].asString := '0';
Data['host'].asString := '*CENSORED*';
Data['hostv6'].asString := '';
Data['inerror'].asString := '1';
Data['interfacenumber'].asString := '';
Data['inum'].asString := '';
Data['ipversion'].asString := '0';
Data['isexesensor'].asString := '1';
Data['lastmsg'].asString := '#Y2 @#O233 @#O231[No mapping for the Unicode character exists in the target multi-byte code page]';
Data['lastuptime'].asString := '0';
Data['linuxlogindomain'].asString := '';
Data['linuxloginpassword'].asString := '***';
Data['monitorchange'].asString := '';
Data['mutexname'].asString := '';
Data['notonpod'].asString := '0';
Data['reboot'].asString := '43381.3839208681';
Data['reqmsginterval'].asString := '60';
Data['resultfile'].asString := 'Result of Sensor 2139.txt';
Data['sensorid'].asString := '2139';
Data['simulate'].asString := '0';
Data['timeout'].asString := '60';
Data['tlsexplicit_default'].asString := '';
Data['tlsexplicit_ftp'].asString := '';
Data['tlsexplicit_imap'].asString := '';
Data['tlsexplicit_pop3'].asString := '';
Data['tlsexplicit_port'].asString := '';
Data['tlsexplicit_smtp'].asString := '';
Data['uptimecount'].asString := '0';
Data['usednstime'].asString := '0';
Data['usewindowsauthentication'].asString := '1';
Data['windowslogindomain'].asString := '';
Data['windowsloginpassword'].asString := '***';
Data['windowsloginusername'].asString := '*CENSORED*';
Data['writeresult'].asString := '1';

So maybe here can be the problem.
I just have added a new sensor to the local probe which is running on my prtg sever.
As I understand I have to create a second local probe on my Veeam Server?

Cause as you can see, the VeeamSnapIn cannot be found, cause on the prtg server, veeam isnt is installed.

Add-PSSnapin : Es wurden keine Snap-Ins fr die Windows PowerShell-Version 5 registriert.
In C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\PRTG_VeeamBRStats.ps1:44 Zeichen:8
+     if (!(Add-PSSnapin -PassThru VeeamPSSnapIn)) {
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (VeeamPSSnapIn:String) [Add-PSSnapin], PSArgumentException
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
 
C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\PRTG_VeeamBRStats.ps1 : 
ERROR: Cannot load the VEEAM Snapin.
In Zeile:1 Zeichen:1
+ &'C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\P ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,PRTG_VeeamBRStats.ps1
 
0:

Created on Oct 9, 2018 9:18:41 AM by  André Brückmann (0)

Last change on Oct 9, 2018 9:48:43 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi André,

Could you issue the following PowerShell Command on the PRTG Core Server to see what you get back?

Get-PSSnapin -Name VeeamPSSnapIn

Best regards.

Created on Oct 9, 2018 9:49:52 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Dariusz,

thanks for the fast reply. On the PRTG Core Server I get the following message:

PS C:\Windows\system32> Get-PSSnapin -Name VeeamPSSnapIn
Get-PSSnapin : No Windows PowerShell snap-ins matching the pattern 'VeeamPSSnapIn' were found. Check the pattern and
then try the command again.
At line:1 char:1
+ Get-PSSnapin -Name VeeamPSSnapIn
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (VeeamPSSnapIn:String) [Get-PSSnapin], PSArgumentException
    + FullyQualifiedErrorId : NoPSSnapInsFound,Microsoft.PowerShell.Commands.GetPSSnapinCommand

Best regards.

Created on Oct 9, 2018 10:07:34 AM by  André Brückmann (0)



Votes:

1

Your Vote:

Up

Down

Hi André,

The error message indicates that the VMWare Snapin could not be found on the PRTG Server. Unfortunately, I am not sure what to do at this point as this script is not created by us as mentioned in the initial Top Answer:
https://github.com/mycloudrevolution/Advanced-PRTG-Sensors/

Best regards.

Created on Oct 9, 2018 10:13:13 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Dariusz,

the problem that the Veaam SnapIn cannot be found on prtg core server is correct. But on the server where Veeam is installed I'll get the following reply.

PS C:\Windows\system32> Get-PSSnapin -Name VeeamPSSnapIn


Name        : VeeamPSSnapin
PSVersion   : 5.1
Description : This is a PowerShell snap-in that includes the Veeam's cmdlet.

So correct me if Iam wrong but is there a way to execute the powershell script at the target machine (Veeam) and not on the Core PRTG server?

Created on Oct 9, 2018 10:26:44 AM by  André Brückmann (0)

Last change on Oct 9, 2018 10:39:00 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi André,

Could you try installing the snapin on the Core Server?
https://www.veeam.com/kb1489

Best regards.

Created on Oct 9, 2018 10:39:22 AM by  Dariusz Gorka [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.