diggn
Contributor
Contributor

replication monitoring/API?

Hi,

We have replication between two data-centers set-up for a couple of VMs.  We'd like to be able to see the

status of their replication in Nagios (maybe also stand-up alerting?), rather than having to rely on the vSphere

web client to check these manually.

I've been browsing the website & doco for the last couple of hours without much luck.

Is there an API (preferably python/perl, as we're a Linux shop) that will let me interrogate the state of

replication? Maybe an SNMP MIB? Linux command line tools I can run remotely?

Cheers,

Andrej

0 Kudos
8 Replies
mmarinov
VMware Employee
VMware Employee

Hi Andrej,

Unfortunately you can't use an API as the management layer does not expose it. However you can check this post virtuallyGhetto: HBR (Host Based Replication) CLI for SRM 5 on how to query the replication engine on the source host. Keep in mind that if you use this approach there could be differences between what you can see in the VR UI and the result you will receive through that tool.

Regards,

--Martin

Martin Marinov VMware Software Engineer If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points
0 Kudos
mvalkanov
VMware Employee
VMware Employee

Hi,

Not exactly what you are looking for, but perhaps you can use the VR events (for example RPO violated and RPO restored) posted at vCenter Server at both source site and target site and also configure alarms for them.

Regards,

Martin

0 Kudos
diggn
Contributor
Contributor

Hi Martin,

Thanks for the suggestion, it was very valuable for me to learn about vim-cmd usage, but not related to

my actual question (it will let me know what the CURRENT state is, but I can't find a way to extract the

time-stamp of the last successful replication (which is what we're really after).

I may start trawling the logs on the ESX servers, which will be tedious, and I'm not sure how I will

then integrate that with nagios, either, but I can do some scripting to get it sorted, I'm sure. Smiley Happy

Cheers,

Andrej

0 Kudos
diggn
Contributor
Contributor

Hi again Martin,

Can you please let me know how to get to the VR events from a machine w/o using the WebUI?

Cheers,

Andrej

0 Kudos
mvalkanov
VMware Employee
VMware Employee

Hi,

Please see the official documentation of vSphere API/SDK about EventHistoryCollector. This is the same functionality for all events posted in vCenter Server, not only VR ones. It is not easy, but currently VR has no public API.

An alternative approach would be to set up alarms in vCenter for the necessary VR events and execute a command to pass the data to Nagios (something similar to VMWare vCenter alarm sender - Nagios Exchange).

Regards,

Martin

0 Kudos
diggn
Contributor
Contributor

Hi again  Martin,

I did look at the EventHistoryCollector API and put that on the back-burner for now; I'd rather try some other (simpler?)

ways first.

The nagios alarm sender requires a windows piece of infrastructure which we don't have.

Cheers,

Andrej

0 Kudos
strik123
Contributor
Contributor

Hello,

Please check this post reporting-on-rpo-violations-from-vsphere-replication/

You can create own script in PowerCLI  to monitoring replication VM.

Regards,

Piotr

0 Kudos
LynchD
Contributor
Contributor

Hi Andrej,


I am looking into a similar solution now also, having looked at PowerCli etc.


Have you got any further in monitoring SRM?

Dave

0 Kudos