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


How can I monitor SCVMM hosts and VMs with PRTG?

Votes:

0

Your Vote:

Up

Down

I would like to monitor hosts and virtual machines that are managed by a Microsoft SCVMM. In previous PRTG versions, there were the sensor types SCVMM Host sensor and SCVMM Virtual Machine sensor. As announced in PRTG version 16.1.23, these sensor types are now deprecated and were removed with version 16.x.25.

Is there still a way to include SCVMM hosts and SCVMM VMs into my monitoring with PRTG?

cleanup custom-script-exe custom-sensor deprecated device-template lookups prtg remove scvmm sensor

Created on Mar 10, 2016 1:47:21 PM by  Gerald Schoch [Paessler Support]

Last change on Jul 24, 2019 7:47:20 AM by  Maike Behnsen [Paessler Support]



31 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

This article applies to PRTG Network Monitor 19 or later

Monitoring SCVMM Hosts and SCVMM Virtual Machines

The SCVMM Host sensor and the SCVMM Virtual Machine sensor are two sensor types that we removed in the context of the PRTG Sensor Cleanup. You could use these sensors to monitor hosts and virtual machines (VM) managed by a Microsoft System Center Virtual Machine Manager (SCVMM) like Hyper-V, VMware, or XenServer hosts and VMs. As of PRTG version 16.1.23, you cannot add these sensors anymore and running SCVMM sensors were removed from PRTG with version 16.x.25.

Nevertheless, you can still continue (or start) monitoring your SCVMM. For example, you can use an EXE/Script sensor that runs an according PowerShell (ps1) script.

We provide a custom script for SCVMM monitoring for download and you can additionally use a device template to automatically add SCVMM sensors to an SCVMM device. Follow the steps below to add sensors that monitor SCVMM hosts and SCVMM virtual machines to your PRTG installation.

Using the PowerShell script, you can monitor the following values on a SCVMM host:

  • Overall State
  • Communication State
  • CPU Utilization
  • Total Memory
  • Available Memory
  • Cluster Node Status
  • Virtual Server State
  • Computer State
  • Host Cluster

For an SCVMM virtual machine, the custom sensor can show the following values:

  • Status
  • CPU Usage
  • PerfDiskBytesRead
  • PerfDiskBytesWrite

Requirements

To use the custom sensors for SCVMM monitoring, you need to fulfill the following requirements. These are the same as for the SCVMM sensors that were available in previous PRTG versions:

  • PowerShell 4.0 installed on the computer running the PRTG probe (locally or on the remote probe system)
  • .NET 4.0 installed on the computer running the PRTG probe
  • Windows credentials in the settings of the device that represents your SCVMM
  • Remote PowerShell 2.0 enabled on the target SCVMM device
  • VMM PowerShell Plugin installed on the target SCVMM device (under Windows 2008/2012, it is part of the VMM 2008/2012 Administrator Console)
  • Windows Management Framework 1.0 or later installed on the computer running the PRTG probe (because the included System.Management.Automation namespace is required by the SCVMM sensors)
  • Requirements for Windows Server 2012 compatibility:
    • The SCVMM PowerShell module has to be in the directory C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\bin\psModules\virtualmachinemanager\virtualmachinemanager
    • Set the execution policy in PowerShell to allow the execution of Import-Module C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\bin\psModules\virtualmachinemanager\virtualmachinemanager Use the command Set-ExecutionPolicy (we recommend RemoteSigned).

For more information, see Where can I find more information about PowerShell sensors?

Steps to Take

  1. Download the SCVMM sensor package that contains the PowerShell script, the device template, and the lookup files: PRTG-SCVMM-HyperV.zip
    Use the updated script located at GitHub.
  2. Unzip and save the script PRTG-SCVMM-HyperV.ps1 to the \Custom Sensors\EXE subfolder of your PRTG program directory on the system with the probe from which you want to monitor your SCVMMs.
  3. Open a PowerShell (32-bit) with admin privileges on this system and execute the following command (and confirm it):
    Set-ExecutionPolicy RemoteSigned
    • Note: Executing the PowerShell script with PowerShell (x86) will not work with the script. The sensor message is UnauthorizedAccess when trying a 64-bit PowerShell.
  4. Unzip and save the following lookup files to the \lookups\custom subfolder of your PRTG program directory on the PRTG server.
    Note: This step is not necessary if you updated from a PRTG version previous to 16.1.23.
    • prtg.standardlookups.hyperv.clusternodestatus.ovl
    • prtg.standardlookups.hyperv.communicationstate.ovl
    • prtg.standardlookups.hyperv.computerstate.ovl
    • prtg.standardlookups.hyperv.hoststatus.ovl
    • prtg.standardlookups.hyperv.virtualserverstate.ovl
    • prtg.standardlookups.hyperv.vmstatus.ovl
  5. Add a device to PRTG that represents your SCVMM.
  6. Provide your Credentials for Windows Systems if the inherited credentials are not sufficient for the SCVMM.
  7. Add a new HTTP Push Data (Advanced) sensor to the device, name it any way you like (for example, "Template Sensor"), and pause it. Write down its sensor ID.
  8. Create a new EXE/Script sensor and select the PRTG-SCVMM-HyperV.ps1 script.
  9. Set the timeout to 900 seconds.
  10. Enter the corresponding parameters. These are explained in the table below.
  11. Click Continue.

When you directly enter the data in the script, you can also test it on the fly. Initially, it will look like the attached screenshot #1, consequential runs will look like #2. Note that the sensors may not get any data immediately after the first run. This is because the sensors' startup will take some time and the script may push values prior to that.

Detailed output of the sensor when it is initially executed adding new hosts or VMs:

SCVMM Sensor in the console
Click to enlarge.

Detailed output of the sensor when executed with an existing GUID file:

SCVMM Sensor in the console
Click to enlarge.

Custom SCVMM Sensor monitoring a Virtual Machine:

SCVMM VM Sensor
Click to enlarge.

Parameters

ParameterDescription
prtgHostNameThe URL of your PRTG web interface, for example, http://prtg.acme.com or https://prtg.acme.com
prtgPortThe port used by your PRTG web interface, for example, 80 or 443
prtgUserNameA user with read/write permissions for the device or a PRTG administrator
prtgPassHashThe passhash of the above user
prtgPushPortThe push port you configured in the template HTTP Push Advanced sensor
prtgScvmmDeviceIdThe ID of the device that resembles your SCVMM server:
Recommended value is %deviceid
prtgTemplateSensorThe ID of the HTTP Push Data (Advanced) template sensor (not the sensor token, but the PRTG ID)
UserdomainThe domain of the user that will be used for Remote PowerShell access:
Recommended value is %windowsdomain
UsernameThe username that will be used for Remote PowerShell access:
Recommended value is %windowsuser
PasswordThe password of the user that will be used for Remote PowerShell access:
Recommended value is %windowspassword
VerboseWhen this is set, the script will output debug messages. This can always be enabled as it does not bother PRTG.

Version History

VersionRelease Notes
1.3[Changed] Switch to a HTTP Push sensor-based system. No device templates are needed. This is better for large environments.
[Notes]
The sensor is a simple EXE/Script sensor now, no longer an EXE/Script Advanced sensor.
Device templates are no longer needed, as the sensor automatically creates new sensors for new hosts and VMs with each run. With every run, we only run Get-VMHost and Get-VM once on the SCVMM host, receiving all objects at once, not once for every VM. A GUID file is maintained for every SCVMM host that will prevent sensor duplicates. Performance-wise, this is a lot easier and faster. Three VMs and one host take 2 seconds to scan. There is even more detailed script output to see what the script actually does, receives and evaluates.
1.21[Changed] The device template now has a timeout of 5 minutes for large environments.
[Changed] The default VMsensor scanning interval is set to 10 minutes (since there are 10-minute averages).
1.2[Improved] Naming conventions of the sensor
[Fixed] Auto-discovery is now working with the stable version.
1.1[Improved] Documentation
[Fixed] Values were not correctly retrieved when multiple VMs were present.
[Fixed] Values were not correctly retrieved because of a lookup bug.
1.0Initial Release

Flow chart

Credits

Special thanks to Richard Garner, computerservicecentre.com, for going through countless tests and bugfixing with me and giving ideas for improvement.

Note

Attention This will not work if your PRTG server uses HTTPS with an unsigned SSL certificate because of PowerShell being picky and only accepting signed certificates.

Created on Mar 10, 2016 2:07:11 PM by  Gerald Schoch [Paessler Support]

Last change on Aug 7, 2019 1:03:56 PM by  Maike Behnsen [Paessler Support]



Votes:

0

Your Vote:

Up

Down

How do we get this to work on Server 2012 R2 SCVMM?

I've installed a remote probe on my SCVMM box and tell it to use the custom discovery like the guide above says. Finds 0.

When I try to run the PRTG-SCVMM-HyperV.ps1 from the machine with the probe I get (regardless of PowerShell running as Administrator or not):

**[NAME.DOMAIN.COM] Connecting to remote server NAME.DOMAIN.COM failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : OpenError: (NAME.DOMAIN.COM:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : AccessDenied,PSSessionStateBroken**

If I run the PS1 from my PRTG server to the SCVMM server NAME.DOMAIN.COM it works. I get a list of HyperVs back.

It looks like as long as I'm not localhost the PS1 file will work.

How can I make this work in PRTG?

Created on Sep 14, 2016 2:10:33 AM by  jw2k13 (0)

Last change on Sep 14, 2016 6:05:55 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

This is probably due to remote powershell not being properly enabled. Please check this for further instructions. Make sure to download the latest version of the sensor from the initial reply as I posted a new version :)

Created on Sep 14, 2016 2:00:27 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Team,

The sensor is succesfully seeing my SCVMM, however i am getting this error when running the script

3/07/2017 12:16:40 AM]      error      Could not create sensor for SYDAWSDC01.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for AWSMELDC01 (GUID: 70d40a8d-4dd4-476d-9b50-e9c6783f5be3)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for AWSMELDC01.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for MMOSRVAPP02 (GUID: 6a812734-e453-4c7f-9c0e-ea37b5dd23c7)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for MMOSRVAPP02.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for SYDSRVHUB01 (GUID: 64c9431b-a628-4afc-be0a-ead1b10fad21)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for SYDSRVHUB01.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for MRN-CAS2 (GUID: cb3f169a-383a-4a06-ba54-ec283343d1fa)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for MRN-CAS2.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for GuestWifiTestVM (GUID: 7d65b3ac-7108-491a-91ab-f2f30fd91a91)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for GuestWifiTestVM.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for Boot (GUID: 5856c590-6cf1-4afc-9750-facb68271205)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for Boot.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for AUSSRVMON01 (GUID: fbf1e27f-fbd5-4b17-bc62-fbd724622360)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for AUSSRVMON01.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for MELSRVDC01 (GUID: caa3b009-3451-43f1-8420-fcdc60c0bcf9)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for MELSRVDC01.
[3/07/2017 12:16:40 AM]   information   Starting sensor creation for AWSSRVAPP01 (GUID: 574d52cd-3c89-4f4b-b339-fff0e8fe8118)
[3/07/2017 12:16:40 AM]      error      Could not create sensor for AWSSRVAPP01.
[3/07/2017 12:16:40 AM]   information   0 new Virtual Machines have been added to PRTG.
[3/07/2017 12:18:20 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (57be3832-f68c-478d-888f-162b2f546c03).
[3/07/2017 12:20:00 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (84e73668-f434-4930-8481-5664321f6220).
[3/07/2017 12:20:02 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (da74ed95-0c77-4081-9461-86bef65dbf2e).
[3/07/2017 12:20:03 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (e81b1ddd-3b73-4284-aaa4-c2341d2423d1).
[3/07/2017 12:20:04 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (f47a588e-e547-4728-99bc-d7b22b4bd280).
[3/07/2017 12:20:05 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (bd83524c-e46f-45f2-807c-0fa2147d6f90).
[3/07/2017 12:20:06 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (df53ed60-4561-432f-827c-53273045b3ef).
[3/07/2017 12:20:07 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (c314a559-7d30-47b2-bcdb-9249fa7877a5).
[3/07/2017 12:20:08 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (0ac01dca-ebcd-40a0-a53e-a335f5a7c75e).
[3/07/2017 12:20:18 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (dcff2afb-fbea-4ead-b6bb-04951f111e0d).
[3/07/2017 12:20:19 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (b3aedd08-81a9-4a16-a1d8-0509d717114a).
[3/07/2017 12:20:20 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (43708edf-6b88-4090-80ff-0a263c1e97b5).
[3/07/2017 12:20:21 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (2c286efa-c241-4db3-a1da-0cd0d22891d2).
[3/07/2017 12:20:22 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (73eefe2d-8bbc-4689-9f33-0cf4db718913).
[3/07/2017 12:20:23 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (dabe90f5-4c55-40c6-b052-11e363cdac3c).
[3/07/2017 12:20:24 AM]      error      Couldn't push the data to the configured PRTG server using the specified token (13b00809-d765-4252-a41e-153dfd857b1e).

I am running SCVMM 2016, however looks more like an issue getting the data into PRTG.

Any ideas or tips would be great.

Cheers Matt

Created on Jul 2, 2017 2:21:41 PM by  MacquarieMedia (0)

Last change on Jul 3, 2017 5:01:15 AM by  Sven Roggenhofer [Paessler Technical Support]



Votes:

0

Your Vote:

Up

Down

Dear MacquarieMedia

Did you manually create the HTTP Push Data Advanced sensor before you ran the script?

Created on Jul 3, 2017 2:01:31 PM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

This seems overly complicated. PRTG has always allowed me to quickly monitor simple and complicated things in an "easier to setup" way then other monitoring applications. This is why I recommend PRTG to other users. But this is not simple.

The instructions could use some more detailed, "example based" instructions for setting up the parameters for the script. This custom sensor should be reworked so that is select-able with the parameters in the web gui vs doing it this way. This would mimic the previous sensor, but require the powershell modules. I recognize that VMWare is probably easier to monitor. Sensors for HyperV and System Center Virtual Machine Manager should be something that PRTG makes easier to setup and monitor then the other monitoring companies.

Thanks for a great product and for listening. DB

Created on Jul 5, 2017 6:34:38 PM by  davbujn17 (0)



Votes:

0

Your Vote:

Up

Down

Dear davbujn17

Yes, this custom sensor solution is rather complicated. But custom sensors cannot be made select-able in the web gui. We don't want to re-add this sensor to the web gui as we deprecated it just last years because of its little overall usage.

It surely appears counter-intuitive how we make the software better if we remove existing features. The idea is two-fold: One, we keep PRTG simple. Second, we reduce the source code, making it easier to rework and easier for new developers to get into it. That means, that we try to not implement little-used features in the first place, and last year we even removed existing, but little-used sensors.

While SCVMM monitoring is now admittedly more complex, we used our development resources to make other things better.

Created on Jul 6, 2017 1:03:03 PM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

We've got more than 8000 VM's in Hyper-V and I'm very pro-PRTG, so I've tried to sell PRTG in our organization. Because of this issue they've decided to not buy the unlimited license.

Created on Jul 24, 2018 9:59:37 AM by  Hermanbrood26 (0)



Votes:

0

Your Vote:

Up

Down

While the script was tested with around 300 VMs, this surely is over the top and we cannot test this with such large environments :( It's rather possible that the script will take a loooong time to retrieve the host servers and virtual machines, running into Windows' 20 minute child process timeout rather than working correctly.

For environments that large, you're probably better off with Microsoft SCOM :)


Kind regards,
Stephan Linke, Tech Support Team

Created on Jul 24, 2018 11:36:19 AM by  Stephan Linke [Paessler Support]

Last change on Jul 24, 2018 11:40:25 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Stephan,

We've got an environment with more than 8000 vm's. We're currently monitoring using PRTG the yper-V hosts only. We would like to buy the unlimited sensor suite of PRTG, but only if PRTG can measure VM's in Hyper-V cluster aware, and directly on the Hyper-V node without SCVMM.

Are you basically saying that PRTG is not a good product for our sizing when it comes to live migrating VM's in Hyper-V?

Created on Jan 21, 2019 1:41:50 PM by  Hermanbrood26 (0)



Votes:

0

Your Vote:

Up

Down

In that case, I'd recommend against it, yes. The HTTP Push Sensors used in this approach are putting less strain on either system (target host and PRTG). It's unfortunately a chicken and the egg case. We can't monitor moving VMs moving on HyperV clusters; even if we could, it would be 8,000 WMI queries against the systems. The script approach above is querying Hyper-V directly, querying all VMs and hosts at once. However, it has not been tested with that amount of VMs - the most we had were about 400, and it took quite a bit to get the values (took about 2-3 minutes to get them).


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Jan 21, 2019 7:10:40 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi. I'm trying to set up this custom sensor to monitor two SCVMM machines, one SCVMM 2012r2 and one SCVMM 2016. I don't why, but i cannot seem to get the parameters correct on the sensor settings.

I feel like i have tried all possible combinations to get it to work. Can anyone please give me an example on the correct syntax to use for the parameters when creating the sensor?

Created on Feb 25, 2019 4:00:57 PM by  roever (0)



Votes:

0

Your Vote:

Up

Down

Sorry that this took a while, as I was on vacation :( What does your log look like and what parameters do you use, exactly? Did you create the SCVMM device on a remote probe by any chance?

Created on Mar 11, 2019 7:26:17 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Stephan. I have been on vacation also, so no worries there. :)

What logs would you like? Can i PM them in some way? The parameters i entered are anonymized but here is the exact string entered on the parameters field on the sensor settings.

-prtgHostName=https://fqdn.prtgserver.com -prtgPort=443 [email protected] -prtgPassHash=********** -prtgPushPort=5050 -prtgScvmmDeviceId=%deviceid -prtgTemplateSensor=7284 -Userdomain=%windowsdomain -Username=%windowsuser -Password=%windowspassword -Verbose=$true

Right now the sensor says "Monitoring 0 objects. Last scan took 0 seconds and added 0 objects."

The device is created on a probe yes. I have installed the hyper-v script package on both the probe and the main PRTG server.

Created on Mar 21, 2019 12:12:32 PM by  roever (0)

Last change on Mar 21, 2019 6:57:10 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Oh well - nice! :) If it's one a probe, please use this version instead:
https://gist.github.com/stephanlinke/3cf39a40dea862171e383fc9553899b1

It has an additional parameter -prtgProbeAddress, allowing you to pass the FQDN/IP of the Remote Probe. It should work with that one. Otherwise, execute the script on the PowerShell command line with the same parameters, including -Verbose (=$true is not necessary, as it's a switch) and post it here with !NO PUBLISH. Then I can check it without others seeing it :)


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 21, 2019 7:00:15 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Is Remote PowerShell enabled on the SCVMM Server, as disclosed on HowToGeek? The script complains that it cannot connect to the target host :)


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 22, 2019 2:35:31 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Issue remains that the script cannot connect to the target host :( Try the domain without .local in the userdomain instead.


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 25, 2019 7:24:01 AM by  Stephan Linke [Paessler Support]

Last change on Mar 25, 2019 7:24:11 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Sorry, no luck there. Still unable to connect. I have also tried to use the FQDN for bbvmm.

Created on Mar 25, 2019 12:50:36 PM by  roever (0)



Votes:

0

Your Vote:

Up

Down

Executing Get-Command -Module hyper-v | Out-GridView on the target host will give you a comprehensive list of installed Hyper-V modules. Get-VMHost and Get-VM should be included there. Is that the case?


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 26, 2019 1:31:26 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi. Sorry for the late answer. Yes. Get-VM and Get-VMHost is in the list on all hosts. I also checked our SCVMM servers. Both have the Powershell modules for Hyper-V management. Still not getting anything.

Created on Apr 15, 2019 6:23:55 AM by  roever (0)



Votes:

0

Your Vote:

Up

Down

I'll drop you a mail later as this is seemingly something different I'm not seeing yet. I'll be in touch.


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Apr 15, 2019 10:04:18 AM by  Stephan Linke [Paessler Support]



Votes:

1

Your Vote:

Up

Down

I've made a small modification to this script as my SC-VMM also has ESXi hosts in there as we're using the SCVMM tools to migrate away from VMware. I don't want PRTG to be monitoring ESX hosts and vSphere clusters via SCVMM so I've changed lines 423 and 424 from

$hosts = (Get-VMHost); $vms = (Get-VM);

to

$hosts = (Get-VMHost | Where-Object {$_.OperatingSystem -match "Windows"}); $vms = (Get-VM | Where-Object {$_.VirtualizationPlatform -match "HyperV"});

That way, it only returns Hyper-V hosts and VMs.

Created on Apr 24, 2019 10:09:47 AM by  norphus (10)



Votes:

0

Your Vote:

Up

Down

Nice one! :)


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Apr 24, 2019 10:22:52 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Team,

I have created the sensor for the VM monitoring as described in the manual. Unfortunately, the VMs are created twice and in -guidfile.dat no entry is made.

How can I solve this problem?

Best Regards Nils

Created on May 23, 2019 6:41:03 AM by  spyware (0)



Votes:

0

Your Vote:

Up

Down

This likely means that the script can't connect to your SCVMM host and read the hosts/VMs. What's the output of the script when running the script within ISE, configuring the parameters directly in the script?

Created on May 23, 2019 6:50:12 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

The script says that no connection can be made. But in PRTG, VM sensors are created. Unfortunately, I do not have all access data and permissions for the SCVMM server, these are only stored in PRTG. Is it possible to display the output of the script via PRTG?

Created on May 23, 2019 7:13:24 AM by  spyware (0)



Votes:

0

Your Vote:

Up

Down

Are you using these Sensors on a Remote Probe by any chance?


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on May 23, 2019 8:21:21 AM by  Stephan Linke [Paessler Support]

Last change on May 23, 2019 8:21:26 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

No, i use the sensors on the local probe under the SCVMM device

Created on May 23, 2019 8:44:27 AM by  spyware (0)



Votes:

0

Your Vote:

Up

Down

Strange. Could you check if it makes a difference when disabling the IE first run wizard on a system level, according to https://stackoverflow.com/a/43496639 - simply create the registry entry and let the script run again. Do you get the same error?


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on May 23, 2019 12:54:36 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Stephan,

The registry entry has brought no change. I have run the script once with the correct access data directly on the core sample. There were three error messages. The VMs were successfully read and created in PRTG as a sensor, but these sensors do not provide any values. In addition, duplicate sensors with the same GuID will continue to be created

Method invocation failed because [System.Diagnostics.Stopwatch] does not contain a method named 'new'.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE\PRTG-SCVMM-HyperV.ps1:126 char:1
+ $Stopwatch = [system.diagnostics.stopwatch]::new()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound
 


You cannot call a method on a null-valued expression.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE\PRTG-SCVMM-HyperV.ps1:530 char:1
+ $Stopwatch.Start();
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull



You cannot call a method on a null-valued expression.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE\PRTG-SCVMM-HyperV.ps1:531 char:23
+ This-GetSCVMMObjects; $Stopwatch.Stop();
+                       ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Created on May 28, 2019 11:39:25 AM by  spyware (0)

Last change on May 31, 2019 6:03:28 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Are the latest PowerShell version (5.1) and .NET installed on the PRTG Server? Please also try the updated script version available at github. Thanks!

Created on May 31, 2019 6:04:03 AM by  Stephan Linke [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.