• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

vSphere 5.0 HA: Application Monitoring intro

Duncan Epping · Aug 11, 2011 ·

I don’t think anyone has blogged about App Monitoring yet so I figured I would do a “what’s new / intro” to App Monitoring in vSphere 5.0. Prior to vSphere 5 App Monitoring could only be leveraged by partners which had access to the SDK/APIs. A handful of partners leveraged those of which probably Symantec’s ApplicationHA is the best example. The “problem” with that though is that you would still need to buy a piece of software while you might have in-house development who could easily bake this into their application… well with vSphere 5 you can. I grabbed one of the latest code drops and started playing around. Note that I am not going to do an extensive article on this. Just showing what you have after installing the package. In my case I installed it on a Windows VM.

Now first of all after installing the package you will have new executable. This executable allows you to control App Monitoring offers without the need to compile a full binary yourself. This new command, vmware-appmonitoring.exe, takes the following arguments, which are not coincidentally similar to the functions I will show in a second:

  • Enable
  • Disable
  • markActive
  • isEnabled
  • getAppStatus

When running the command the following output is presented:

C:\VMware-GuestAppMonitorSDK\bin\win32>vmware-appmonitor.exe
Usage: vmware-appmonitor.exe {enable | disable | markActive | isEnabled | getApp Status}

Now I guess most parameters speak for itself. “Enable” will allow you to switch on App Monitoring and “Disable” turns it off again. “IsEnabled” will give you the current status, is it on or off? The “getAppStatus” tells what the status is of your app, is it healthy and has it been sending heartbeats regularly, well than the result will be green if there is a real issue than it will be red. (There’s also gray which means HA just picked up on the VM it’s status needs to be cleared and monitoring should be started soon) Now the one that is most important is “markActive”. This parameter needs to be called at least every 30 seconds. This is the heartbeat parameter. In other words “markActive” is what informs HA that the application is still alive!

I am sure that as soon as William Lam gets his hands on the package he will go wild and release a bunch of scripts which will allow you to enhance resiliency for application/service. These parameters can also be used by your development team, but in the form of a function. The Application Awareness API allows for anyone to talk to it using different types of languages like C++ and Java for instance. Currently there are 6 functions defined:

  • VMGuestAppMonitor_Enable()
    Enables Monitoring
  • VMGuestAppMonitor_MarkActive()
    Mark application as active, recommend to call this at least every 30 seconds
  • VMGuestAppMonitor_Disable()
    Disable Monitoring
  • VMGuestAppMonitor_IsEnabled()
    Returns status of Monitoring
  • VMGuestAppMonitor_GetAppStatus()
    Returns the current application status recorded for the application
  • VMGuestAppMonitor_Free()
    Frees the result of the VMGuestAppMonitor_GetAppStatus() call

These functions could be used by your development team to enhance resiliency in a simple way. This is just the start however, I personally would like to see some sort of rolling patch process added on top and for instance the ability to restart service or have a partial VM failure. Or even the hint the hypervisor that there is a partial failure and request a vMotion to a different host to validate if that solves the problem… If you feel there’s something that needs to be added to App Monitoring let me know and I’ll make sure the PM/Dev Team reads this thread.

** disclaimer: some of this info was taken from the vSphere 5.0 Technical Deepdive book **

Share it:

  • Tweet

Related

Server 5, 5.0, app monitoring, applicationHA, ha, vm monitoring, vSphere

Reader Interactions

Comments

  1. philoo says

    12 August, 2011 at 11:40

    Hi Duncan,

    Thanks for your article. Indeed, application monitoring has never been described so far and that was a shame.
    I would like to know something. Maybe my question is no sense, but we never know 🙂

    I Am developping a new monitoring tool for our company based on nagios. application monitoring has always been difficult and always need a agent.
    With VMware Application monitoring API, is there a possibility, even if it will need a lot of development and time, to monitor application without an agent ?
    If not, could the Vmware application monitoring API be used that way one day ?

    thanks.

    Kind regards

    Gillet Philippe

    • Duncan Epping says

      12 August, 2011 at 12:18

      Well the application or script that ties in with the application still needs to send heartbeats… so whether you write an agent/script for nagios or for App Monitoring will not make much difference besides that if you do it right you can monitor the app and restart the VM if required 🙂

      • philoo says

        12 August, 2011 at 13:51

        ok Thanks for your answer.
        I thought it could be possible to enhance in a certain way VMware tools so it could monitor applications (I didn’t believe it too much… but .. 🙂 )
        What I understand is that it could be useful to restart applications.

        it ‘s very interesting anyway !

  2. Michael Ryom says

    17 August, 2011 at 11:02

    Hi Duncan

    So is it possible to tie a scripted action to a given event…

    FX:

    Event a: Lets say a module failes is it possible to just restart the module or do you need to restart the hole app or vm ?

    Event b: Lets say this given app fails on a server but, a simple restart of the app/vm isnt enough, but you need to restart multiple servers in a given order and have to wait for every server to come up in the right order ?

    Maybe a little much to ask for… but thats really where i see the full potential for App HA.

    Thanks

    Michael

    • Duncan says

      17 August, 2011 at 11:20

      Well any app could already do that right now by simply monitoring its own components and restart what’s needed. (Many of VMware tools that by adding a watchdog service)

  3. John Harney says

    2 April, 2012 at 20:09

    Hello Duncan,
    I would like to see this API demo’d with a product like IBM DataStage. DataStage does not have an HA capability as of yet and we always have to rig some kind of HA scenario with every deployment. Have you heard of anything or anyone out there doing this?

    Thanks,
    JGH

  4. Duncan Epping says

    3 April, 2012 at 13:08

    I have never seen that to be honest John. Not much i can do for you here….

  5. Greg Cullen says

    11 July, 2012 at 18:31

    John – Check out Marathon everRun MX solution. Besides automatic HA capabilities, it adds Fault Tolerant (no single point of failure and no transaction or data loss).

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the “vSphere Clustering Technical Deep Dive” series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

Feb 9th – Irish VMUG
Feb 23rd – Swiss VMUG
March 7th – Dutch VMUG
May 24th – VMUG Poland
June 1st – VMUG Belgium

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2023 · Log in