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 using 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 and the Veeam Enterprise Manager.

His article is available here: http://mycloudrevolution.com/2016/02/29/prtg-veeam-br-monitoring/

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 need to monitor Veeam, but you don't have Veeam Enterprise Manager, please see this article instead, which covers how to monitor Veeam without using Enterprise Manager.

custom-script-exe custom-sensor exexml powershell prtg veeam

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

Last change on Jan 10, 2017 10:21:34 AM by  Martina Wittmann [Paessler Support]



26 Replies

Votes:

0

Your Vote:

Up

Down

PRTG – Veeam B & R Monitoring

Although Veeam Backup & Replication includes extensive email reporting, I’d like to take it a step further, to include:

  • Multiple Veeam Backup & Replication servers
  • Detailed statistics
  • Detailed alerting

And that’s where the Veeam Backup Enterprise Manager comes into play. With this additional component you can get central reporting on multiple Veeam Backup & Replication servers.

http://mycloudrevolution.com/wp-content/uploads/2016/02/veeam-bem.png

And if you add the Veeam Enterprise Plus Edition, you get a powerful RESTful API for the Backup Enterprise Manager.

Using Powershell scripts and the Veeam API you can build comprehensive PRTG sensors, including real-time alerting and reporting on historical data (e.g. for license reports).

http://mycloudrevolution.com/wp-content/uploads/2016/02/veeam-prtgv2.png

http://mycloudrevolution.com/wp-content/uploads/2016/02/veeam-prtg_livedata.png

Veeam B & R Monitoring with PRTG – How it Works

To create a custom script sensor in PRTG you need to save a script (preferably Powershell) in the following directory on the machine where the script will run (on the core server or on the remote probe):

%programfiles(x86)%\PRTG Network Monitor\Custom Sensors\EXEXML or %programfiles%\PRTG Network Monitor\Custom Sensors\EXEXML

Preparation:

  1. Give the script user rights in Backup Enterprise Manager
  2. Disable IE First-Run (because of “Invoke-WebReques” and “Invoke-RestMethod”)

[HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMain] „DisableFirstRunCustomize“=dword:00000001

The Script:

The latest version of the script can be downloaded from the Github Gist link below:

You can also run the script manually to test it:

http://mycloudrevolution.com/wp-content/uploads/2016/02/veeam-prtg_test.png

Creating the Sensor:

Add an “EXE/Script Advanced” sensor to a device

http://mycloudrevolution.com/wp-content/uploads/2016/02/veeam-prtg_addsensor_1.png

Settings for the EXE/Script Advanced Sensor

http://mycloudrevolution.com/wp-content/uploads/2016/02/veeam-prtg_addsensor_2.png

Note!! Using the option “Write EXE result to disk” can be very helpful for debugging. The logs will be saved here: %programdata%\Paessler\PRTG Network Monitor\\Logs (Sensors)

Special Thanks:

This article was inspired by Mike Roberts’ (@gngrninja) article Powershell: NetApp LUN monitoring with a PRTG custom sensor. Thanks, Mike!

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

Last change on Jan 25, 2018 9:51:22 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello,

I am having troubles with this Sensor. The core server is running on Windows 2012 R2, so the steps of the section "Preparation:" differ a bit (there is no Policies path...).

So instead this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main]
"DisableFirstRunCustomize"=dword:00000001

I have done this:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main]
"DisableFirstRunCustomize"=dword:00000001

Since it is not working, I enabled the option "Write EXE result to disk" and I get this:

Invoke-WebRequest : The response content cannot be parsed because the Internet 
Explorer engine is not available, or Internet Explorer's first-launch configura
tion is not complete. Specify the UseBasicParsing parameter and try again. 
At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\PRTG-Veeam
-SessionStats.ps1:11 char:12
+ $AuthXML = Invoke-WebRequest @Auth
+            ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [Invoke-WebRequest], NotSupp 
   ortedException
    + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.Po 
   werShell.Commands.InvokeWebRequestCommand
 
Cannot index into a null array.
At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\PRTG-Veeam
-SessionStats.ps1:14 char:1

Any ideas?

Thank you,

Eneko

Created on Feb 9, 2017 12:55:21 PM by  skrbnik (0)

Last change on Feb 10, 2017 11:33:54 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Yep, you need to start IE on the PRTG server at least once in order to make the sensor work :)

Created on Feb 10, 2017 11:37:54 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Yes, now it is working. I had to login first with the user that is configured in the Powershell script to access to Veeam Enterprise Manager and start IE once to accept the First run prompt.

So thank you and regards,

Eneko

Created on Feb 10, 2017 12:08:37 PM by  skrbnik (0)



Votes:

0

Your Vote:

Up

Down

Hi,

after re-enabling the sensor I get a bit weird dashboards, showing messages like:

"38,4487 % (Demo Disk Free) is above the warning limit of 37 % in Demo Disk Free. My custom note for warnings (Demo values. OS: Windows_NT)"

and in the logs I see this:

<?xml version="1.0" encoding="Windows-1252" ?>
<prtg>
   <result>
       <channel>Demo Minimum Example</channel>
       <value>3</value>
   </result>
   <result>
       <channel>Demo Disk Free</channel>
       <unit>Percent</unit>
       <mode>Absolute</mode>
       <showChart>1</showChart>
       <showTable>1</showTable>
       <warning>0</warning>
       <float>1</float>
       <value>38.4487</value>
       <LimitMaxError>80</LimitMaxError>
       <LimitMaxWarning>37</LimitMaxWarning>
       <LimitWarningMsg>My custom note for warnings</LimitWarningMsg>
       <LimitErrorMsg>My custom note for errors</LimitErrorMsg>
       <LimitMode>1</LimitMode>
   </result>
   <result>
       <channel>Demo Network Speed</channel>
       <unit>SpeedNet</unit>
       <volumeSize>MegaBit</volumeSize>
       <mode>Absolute</mode>
       <showChart>1</showChart>
       <showTable>1</showTable>
       <warning>0</warning>
       <float>0</float>
       <value>124487000</value>
   </result>
   <result>
       <channel>Demo Custom</channel>
       <unit>Custom</unit>
       <customUnit>Pieces</customUnit>
       <mode>Absolute</mode>
       <showChart>1</showChart>
       <showTable>1</showTable>
       <warning>0</warning>
       <float>0</float>
       <value>855</value>
   </result>
   <text>Demo values. OS: Windows_NT</text>
</prtg>

Any ideas?

Thank you,

Eneko

Created on Feb 10, 2017 12:26:44 PM by  skrbnik (0)

Last change on Feb 10, 2017 12:35:08 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

What about it, it's the limit on the channel causing the actual error :) Once you remove it (or modify it according to your needs), it will be green again.

Created on Feb 10, 2017 12:37:24 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Sorry my bad, when recreating the sensor I choose the wrong "EXE/Script"...

No, it is not working.

I have logged in to the PRTG Core Server as the user which is configured to access to Veeam Enterprise Manager, I have fired up IE and access the website after accepting the First Run prompt.

Then I have recreated the sensor choosing this time the right "EXE/Script": PRTG-Veeam-SessionStats.ps1

But when the logs are written to the system I still get:

Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configura tion is not complete. Specify the UseBasicParsing parameter and try again.

Am I missing something?

Thank you,

Eneko

Created on Feb 10, 2017 12:52:51 PM by  skrbnik (0)

Last change on Feb 10, 2017 12:55:37 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Are you using a specific user for that? You might want login with that account and start IE again.

Not sure if the following would do the trick as well:

$AuthXML = Invoke-WebRequest @Auth -UseBasicParsing

Worth a shot though :)

Created on Feb 10, 2017 12:58:23 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Now yes, adding the UseBasicParsing parameter did the trick!!

Thank you very much.

Best regards,

Eneko

Created on Feb 10, 2017 1:09:28 PM by  skrbnik (0)



Votes:

0

Your Vote:

Up

Down

My Veeam access uses HTTPS and testing the Veeam monitoring with powershell I get the error below. How can I use HTTPS with it.

PS C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> .\PRTG-Veeam-SessionStats.ps1
Invoke-WebRequest : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS
secure channel.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-Veeam-SessionStats.ps1:11 char:12
+ $AuthXML = Invoke-WebRequest @Auth
+            ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Cannot index into a null array.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-Veeam-SessionStats.ps1:14 char:1

Created on Feb 16, 2017 4:56:27 PM by  lekside (0)

Last change on Feb 17, 2017 7:44:51 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Please check out my post above and try it as well :)

Created on Feb 17, 2017 11:30:34 AM by  Stephan Linke [Paessler Support]

Last change on Feb 17, 2017 11:31:09 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Do you you mean adding "-UseBasicParsing" to line 11, if yes I attempted that as well before sending the update and had the same result. I do notice that on my Windows server 2012 R2 I do not see the "DisableFirstRunCustomize" in the specified folder below. Do I need to create it?

[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main]
"DisableFirstRunCustomize"=dword:00000001

Could it have anything to do with the SL/TLS error below ? I see github repo and PRTG script above uses HTTP and not HTTPS

"Invoke-WebRequest : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."

Created on Feb 17, 2017 6:51:10 PM by  lekside (0)

Last change on Feb 20, 2017 6:12:55 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Okay then. Could you add the following above the invoke-webrequest line:

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

This should cause PowerShell to ignore the invalid ssl certificate...

Created on Feb 20, 2017 6:26:37 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Here is the new error I saw after placing thee new line above the invoke-webrequest line

PS C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> .\PRTG-Veeam-SessionStats.ps1
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-Veeam-SessionStats.ps1:12 char:12
+ $AuthXML = Invoke-WebRequest @Auth -UseBasicParsing
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Cannot index into a null array.

Created on Feb 21, 2017 3:22:15 PM by  lekside (0)

Last change on Feb 24, 2017 12:59:25 PM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Just out of curiosity, you're using a self signed certificate on your Veeam, correct?
Would it be possible to get a signed one onto it?

Created on Feb 22, 2017 7:41:25 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi,

I had the same problem. The invoke-webrequest - command is part of PowerShell 3. You hav to install Management Framework 3 then the script runs quite well.

KR

Created on Feb 24, 2017 7:43:42 AM by  Stefan (0)



Votes:

0

Your Vote:

Up

Down

Hi,

Your script doesn't work on my PRTG (Windows Server 2016 R2) linked with my Veeam Backup & Replication 9.5.

Veeam port : 9392 (Port used by the Veeam Backup & Replication console to connect to the backup server).

If i put 9392 port, my script given nothing.

But if i put your port i gett some error.

Any idea ?

Best regards,

Created on Jul 28, 2017 7:59:19 AM by  Quentin (0) 2

Last change on Jul 28, 2017 8:57:03 AM by  Quentin (0) 2



Votes:

0

Your Vote:

Up

Down

Hi there,

There is no 2016 R2 (yet) - do you mean 2016? You might want to open up an Issue on the github repository for this :)


Kind regards,
Stephan Linke, Tech Support Team

Created on Jul 28, 2017 8:23:42 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi

I am getting this error:

Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\veeam.ps1:14 char:12
+ $AuthXML = Invoke-WebRequest @Auth  -UseBasicParsing
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
 
invoke-restmethod : The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\veeam.ps1:23 char:21
+ [xml]$SessionsXML = invoke-restmethod @Sessions
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
 
invoke-restmethod : The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\veeam.ps1:36 char:16
+ [xml]$VMsXML = invoke-restmethod @VMs
+                ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Any ideas?

Created on Sep 27, 2017 3:43:35 PM by  figgy1978 (0) 1

Last change on Sep 27, 2017 6:25:44 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi,

Are you using an unsigned HTTPS certificate in your PRTG installation by any chance?


Kind regards,
Stephan Linke, Tech Support Team

Created on Sep 27, 2017 6:26:40 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

For Veeam Enterprise Manager it was changed to a signed one in IIS. This was fine. I have noticed this isn't changed for the API but can't see where to change this. I have also added the unsigned certificate on the PRTG server and it can get to the api site without certificate errors.

Created on Sep 29, 2017 10:14:32 AM by  figgy1978 (0) 1

Last change on Sep 29, 2017 10:40:05 AM by  figgy1978 (0) 1



Votes:

0

Your Vote:

Up

Down

Okay, please check if this makes a difference.


Kind regards,
Stephan Linke, Tech Support Team

Created on Sep 29, 2017 10:47:40 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi

This works very nicely, finally making it easy to monitor veeam backups.

A quick tip:

Veeam reports a backupjob as failed in FailedJobRuns even if the retry is successful, which can lead to false positives. I've added a sensor for "FailedVmLastestStates" which will report if backup of a single VM failed. You could also edit FailedJobRuns to only give warnings.

Add this to your script to get FailedVmLastestStates

# GET - Overview
$VMsOverview = @{uri = "http://veeam.lindbak.no:9399/api/reports/summary/overview";
                   Method = 'GET';
				   Headers = @{'X-RestSvcSessionId' = $AuthXML.Headers['X-RestSvcSessionId'];
           } #end headers hash table
	}

[xml]$VMsOverviewXML = invoke-restmethod @VMsOverview
$FailedVmLastestStates = $VMsOverviewXML.OverviewReportFrame.FailedVmLastestStates

Write-Host "<result>"
               "<channel>FailedVmLastestStates</channel>"
               "<value>$FailedVmLastestStates</value>"
               "<showChart>1</showChart>"
               "<showTable>1</showTable>"
               "<LimitMaxError>1</LimitMaxError>"
               "<LimitMode>1</LimitMode>"
               "</result>"

Created on Nov 13, 2017 11:16:17 AM by  Eirik Hauge (0) 1

Last change on Nov 14, 2017 7:46:58 AM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi, Script is working fine in powershell but i get in PRTG :

Response not well-formed: "(<prtg> <result> <channel>SuccessfulJobRuns</channel> <value>4</value> <showChart>1</showChart> etc..

Any idea ?

Created on Mar 11, 2019 1:02:11 PM by  nirwana (10)



Votes:

0

Your Vote:

Up

Down

Are you using the Advanced variant of the sensor? That'll be required for XML based output.


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 12, 2019 9:15:56 AM by  Stephan Linke [Paessler Support]



Votes:

1

Your Vote:

Up

Down

Thanks. Yes, was that.. New to PRTG , didnt know of the 2 separated EXE sensors XML or not..

Created on Mar 18, 2019 9:25:27 AM by  nirwana (10)



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.