API to get VDB status(Running/Not running), host/target environment on which it is hosted,

  • 0
  • 1
  • Question
  • Updated 4 weeks ago
  • Answered
Please help me with the API call to automate a report to get the VDB status , and the host/target server on which it is mounted
Photo of Anusha Gadiraju

Anusha Gadiraju

  • 152 Points 100 badge 2x thumb
  • undecided

Posted 1 month ago

  • 0
  • 1
Photo of Sean Nothdurft

Sean Nothdurft, Technical Support

  • 1,190 Points 1k badge 2x thumb
Official Response
Hi Anusha-

Details on the VDB status are found under /source in the CLI and API.  Here's an example request from a CLI session collecting the values you requested. In the following output, VDBs would be indicated where "virtual" is TRUE:
delphix-engine> source list display=name,runtime.status,runtime.activeInstances.0.hostName,mountBase,virtual
NAME RUNTIME.STATUS RUNTIME.ACTIVEINSTANCES.0.HOSTNAME MOUNTBASE VIRTUAL DBOMSRCECB2A RUNNING gi-rh75-base - false iotest RUNNING gi-rh75-base /mnt/provision true joyful RUNNING - - false dx99vvel5XXIt95QI7keQ_joyful RUNNING - /work/4213dcf3-bfdd-3848-397b-047a98cc5714-staging-1 false
Details on the /source API can be found on your Engine by accessing the relevant API page (note, you will need to login to the usual Admin interface first to obtain an authenticated session)

http://delphix-engine/api/#Source

You may also consider exploring dxToolkit, a free utility developed and supported by our Services team. One of the dxToolkit utilities, dx_get_db_env generates this report detail for you as well.  Here's an example using commands from the page at https://github.com/delphix/dxtoolkit/wiki/dx_get_db_env
Seans-MacBook:dxtoolkit2 $ ./dx_get_db_env -engine seans-engine.delphix.com -type vdb

Appliance            Hostname             Database                       Group           Type     SourceDB                       Parent snapshot                     Used(GB)   Status     Enabled    Unique Name                    Parent time                         VDB creation time                   
-------------------- -------------------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ---------- ---------- ---------- ------------------------------ ----------------------------------- ----------------------------------- 
seans-engine.delphix seanora122tgt        iotest                         Oracle          VDB      DBOMSRCECB2A                   2019-03-14 14:58:55 PDT             1.45       RUNNING    enabled    iotest                         N/A                                 2019-03-14 16:17:47        
Photo of Ranzo Taylor

Ranzo Taylor, Employee

  • 1,664 Points 1k badge 2x thumb
Anusha make it easy on yourself and get dxtoolkit:
https://github.com/delphix/dxtoolkit

Please note it's an open source project, not officially supported by Delphix, but it has robust community support.

Photo of Anusha Gadiraju

Anusha Gadiraju

  • 152 Points 100 badge 2x thumb
Thank you.. do i need to checkin the code in the github and use the utility
Photo of Ranzo Taylor

Ranzo Taylor, Employee

  • 1,664 Points 1k badge 2x thumb
To use the utility, please consult the README which is just a little lower on the page.  There is a "releases" link which will take you to compiled code.  You do not need to checkout and compile the code yourself.