How to know if VDB is stopped or if VDB or dSource have status='cannot monitor' using API?

  • 0
  • 1
  • Question
  • Updated 2 weeks ago
  • Answered
How to know if VDB is stopped or if VDB or dSource have status='cannot monitor'  using API? I know that for status = running, active, inactive I can use the source API call. 
Photo of Pierre Morel

Pierre Morel

  • 110 Points 100 badge 2x thumb

Posted 4 weeks ago

  • 0
  • 1
Photo of Alan Bitterman

Alan Bitterman, Employee

  • 110 Points 100 badge 2x thumb
Hello Pierre,

The dSource or VDB runtime status/details is in the source API.  

See below for details.

Regards,
Bitt...


From a simple Shell Script API Call.

The SOURCE_REF is the VDB source reference. The property of "status" and "enabled" should give you the information you are looking for.  See vdb_init.sh in  https://github.com/duckback00/dxapikit/tree/master/API   for the status and other init operations.

$ STATUS=`curl -s -X GET -k "${BaseURL}/source/${SOURCE_REF}" -b "${COOKIE}" -H "${CONTENT_TYPE}"`
$ echo ${STATUS} | jq --raw-output '.result.runtime'
{
  "type": "AppDataSourceRuntime",
  "status": "RUNNING",
  "accessible": true,
  "accessibleTimestamp": "2019-05-06T22:51:36.299Z",
  "databaseSize": 2504704,
  "notAccessibleReason": null,
  "enabled": "ENABLED"

From CLI (see Runtime Properties) ...

Delphix5330> source
Delphix5330 source> ls
Objects
NAME      CONTAINER  VIRTUAL  CONFIG  
orcl      orcl       false    orcl
AppData   AppData    false    AppData
VAppData  VAppData   true     VAppData
Children
operationTemplate
Delphix5330 source> select VAppData 
Delphix5330 source 'VAppData'> ls
Properties
    type: AppDataVirtualSource
    name: VAppData
    additionalMountPoints: (empty)
    allowAutoVDBRestartOnHostReboot: false
    config: VAppData
    container: VAppData
    linked: false
    logCollectionEnabled: false
    operations:
        type: VirtualSourceOperations
        configureClone: (empty)
        postRefresh: (empty)
        postRollback: (empty)
        postSnapshot: (empty)
        postStart: (empty)
        postStop: (empty)
        preRefresh: (empty)
        preRollback: (empty)
        preSnapshot: (empty)
        preStart: (empty)
        preStop: (empty)
    parameters: {}
    reference: APPDATA_VIRTUAL_SOURCE-20
    runtime:
        type: AppDataSourceRuntime
        accessible: true
        accessibleTimestamp: 2019-05-06T22:43:17.886Z
        databaseSize: 2.39MB
        enabled: ENABLED
        status: RUNNING
    staging: false
    status: DEFAULT
    toolkit: builtin:files
    virtual: true
Operations
update
enable
disable
start
stop
upgrade
Delphix5330 source 'VAppData'>