4 comments on “Hyper-V Replication Status for PRTG

  1. Hi Todd,

    I have been using your script for a few months. It has been extremely useful to monitor the state of the replicas using PRTG, so thanks for sharing.

    One thing I noticed. I recently setup a new test VM and enabled replication. After a few days, I disabled replication and, as expected, PRTG notified me that the replica health was poor. I could not see a way to remove that VM (channel) from the sensor, so simply deleted and recreated the sensor, which populated all the VM’s fresh (excluding the one which I recently removed).

    I am no Powershell expert, but having read through the script, I don’t think it checks and updates which VM’s are enabled for Replication, which is why I needed to delete and recreate.

    Thanks again.

    • The script returns a sensor with multiple channels. Once a VM is removed from Hyper-V the “Measure-VMReplication” commandlet does not return anything about that VM so the channel is no longer populated. Short of keeping a list of retired VM’s and faking a results there is no way to maintain the channel from the script.

      PRTG does not have a way to delete a channel from a sensor. A channel that is no longer in the XML file is considered in an error state by PRTG. A sensor can be deleted but that removes the history of all channels. If losing the history is OK, deleting and re-creating the sensor as Michael did is the easiest way around this. When I remove a VM, I go to the PRTG sensor and for that channel I disable limits, hide in graphs and hide from tables. That way I still have the history of that and the other channels.

      The script could be reworked so that each VM was a sensor. PRTG is licensed per sensor so I wouldn’t want to do it this way as that would consumed a good number of sensors.

      • Thanks for explaining. Very helpful. Your solution is better if the history is important as I’m sure it will be to many. I will remember that in future.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s