API/Python/Open-Source Solutions

Expand all | Collapse all

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

Jump to Best Answer
  • 1.  How to know if VDB is stopped or if VDB or dSource have status='cannot monitor' using API?

    Posted 04-26-2019 02:35:00 AM
    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. 


  • 2.  RE: How to know if VDB is stopped or if VDB or dSource have status='cannot monitor' using API?
    Best Answer

    Posted 05-06-2019 10:52:00 PM
    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'>