Querying Application States

Verifying a DME Configuration

Querying Application States
GET http://<mgmt0_IP>api/mo/sys/appmgrstat/apps/app-<appId>.json
  {
    "totalCount": "1",
    "imdata": [
        {
            "apphostingApp": {
                "attributes": {
                    "appId": "nginx_1",
                    "dn": "sys/appmgrstat/apps/app-nginx_1",
                    "modTs": "2022-07-22T20:57:52.654+00:00",
                    "name": ""
                },
                "children": [
                    {
                        "apphostingAppUtil": {
                            "attributes": {
                                "cpuAlloc": "200",
                                "cpuUsed": "0",
                                "diskAlloc": "10",
                                "diskUsed": "0",
                                "memAlloc": "64",
                                "memUsed": "3052",
                                "modTs": "2022-07-22T21:07:22.135+00:00",
                                "name": "nginx_1",
                                "rn": "util"
                            }
                        }
                    },
                    {
                        "apphostingAppPkg": {
                            "attributes": {
                                "appAuthor": "",
                                "appDesc": "",
                                "appName": "nginx_1",
                                "appOwner": "appmgr",
                                "appType": "docker",
                                "appVer": "latest",
                                "modTs": "2022-07-22T20:57:52.654+00:00",
                                "name": "",
                                "pkgName": "nginx",
                                "pkgPath": "/bootflash/nginx.tar.gz",
                                "pkgUrl": "",
                                "rn": "pkg"
                            }
                        }
                    },
                    {
                        "apphostingAppDetail": {
                            "attributes": {
                                "entryPoint": "/docker-entrypoint.sh  nginx -g 'daemon off;'",
                                "guestIntf": "eth0",
                                "healthStatus": "0",
                                "lastHealthErr": "",
                                "lastHealthOut": "",
                                "modTs": "2022-07-22T20:58:04.265+00:00",
                                "name": "nginx_1",
                                "profileName": "default",
                                "reservCpu": "200",
                                "reservDisk": "10",
                                "reservMem": "64",
                                "rn": "detail",
                                "runCmd": "",
                                "runOpt": "",
                                "state": "started"
                            }
                        }
                    },
                    {
                        "apphostingAppNetUtil": {
                            "attributes": {
                                "intfName": "eth0",
                                "modTs": "2022-07-22T21:08:08.706+00:00",
                                "name": "",
                                "rn": "netutil-eth0",
                                "rxBytes": "0",
                                "rxErrors": "0",
                                "rxPackets": "0",
                                "txBytes": "1006",
                                "txErrors": "0",
                                "txPackets": "13"
                            }
                        }
                    },
                    {
                        "apphostingAppDevice": {
                            "attributes": {
                                "devAlias": "serial2",
                                "devName": "iox_syslog",
                                "devType": "serial/syslog",
                                "modTs": "2022-07-22T20:57:52.654+00:00",
                                "name": "",
                                "rn": "dev-iox_syslog"
                            }
                        }
                    },
                    {
                        "apphostingAppNetIntf": {
                            "attributes": {
                                "intfName": "eth0",
                                "ipV4Addr": "192.168.10.130",
                                "ipV6Addr": "fe80::5054:99ff:fe99:0/64",
                                "macAddr": "52:54:99:99:00:00",
                                "modTs": "2022-07-22T20:58:04.265+00:00",
                                "name": "",
                                "netName": "iox-nat_docker0",
                                "rn": "netintf-eth0"
  }}}]}}]}
{
    imdata:[]
}
GET http://<mgmt0_IP>api/mo/sys/appmgrstat/appresource.json
{
    "totalCount": "1",
    "imdata": [
        {
            "apphostingAppResource": {
                "attributes": {
                    "cpuAvail": "7200",
                    "cpuQuota": "7400",
                    "dn": "sys/appmgrstat/appresource",
                    "memAvail": "3776",
                    "memQuota": "3840",
                    "modTs": "2022-07-22T20:58:04.371+00:00",
                    "name": "",
                    "storageAvail": "93273",
                    "storageQuota": "110745"
}}}]}
{
    imdata:[]
}
GET http://<mgmt0_IP>api/mo/sys/appmgrstat/apps/app-<app-id>/util.json
{{
    "totalCount": "1",
    "imdata": [
        {
            "apphostingAppUtil": {
                "attributes": {
                    "cpuAlloc": "200",
                    "cpuUsed": "0",
                    "diskAlloc": "10",
                    "diskUsed": "0",
                    "dn": "sys/appmgrstat/apps/app-nginx_1/util",
                    "memAlloc": "64",
                    "memUsed": "3052",
                    "modTs": "2022-07-22T21:07:22.135+00:00",
                    "name": "nginx_1"
}}}]}
{
    imdata:[]
}


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload.

show app-hosting detail appid nginx_1
show app-hosting resource
show app-hosting utilization appid nginx_1

Note: The property information for this example was added in release 10.3(1)F.


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
apphostingApp sys/appmgrstat/apps/app-appId


apphostingApp Properties

The following table contains information about the apphostingApp properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeValuesDescription
appIdstring: BasicA sequence of charactersUnique Id of the application
dnreference: BinRef - A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module
modTsmo: TStamp
(scalar: Date)
Selection:
0 to never
Default: never
The time when this object was last modified.


apphostingAppUtil Properties

The following table contains information about the apphostingAppUtil properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeValuesDescription
cpuAllocscalar: Unit32Range: [0, 4294967295]Allocated CPU in units
cpuUsedscalar: Unit64 - Actual CPU used in percentage
diskAllocscalar: Unit64 - Disk space allocation in MB
diskUsedscalar: Unit64 - Actual disk space used in MB
memAllocscalar: Unit64 - Memory allocation in MB
memUsedscalar: Unit64 - Actual memory used in KB
modTsmo: TStamp
(scalar: Date)
Selection:
0 to never
Default: never
The time when this object was last modified
namestring: BasicA sequence of charactersThe name of the object
rnreference: BinRN - Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.


apphostingAppPkg Properties

The following table contains information about the apphostingAppPkg properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeValuesDescription
appAuthorstring: BasicA sequence of charactersAuthor info from application package.
appDescstring: BasicA sequence of charactersDescription available in the package
appNamestring: BasicA sequence of charactersUnique Id used to host application.
appOwnerstring: BasicA sequence of charactersName of the process which creates the application.
appTypestring: BasicA sequence of charactersType of application 'docker'.
appVerstring: BasicA sequence of charactersInstalled version of the application.
modTsmo: TStamp
(scalar: Date)
Selection:
0 to never
Default: never
The time when this object was last modified.
namestring: BasicA sequence of charactersThe name of the object.
pkgNamestring: BasicA sequence of charactersApplication package name.
pkgPathstring: BasicA sequence of charactersApplication package path.
pkgUrlstring: BasicA sequence of charactersApplication package URL.
rnreference: BinRN - Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.


apphostingAppDetail Properties

The following table contains information about the apphostingAppDetail properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeValuesDescription
entryPointstring: BasicA sequence of charactersRun-time entry point used.
guestIntfstring: BasicA sequence of charactersGuest interface name.
healthStatusstring: BasicA sequence of charactersContainer health status.
lastHealthErrstring: BasicA sequence of charactersLast health probe error.
lastHealthOutstring: BasicA sequence of charactersLast health probe output.
modTsmo: TStamp
(scalar: Date)
Selection:
0 to never
Default: never
The time when this object was last modified.
namestring: BasicA sequence of charactersThe name of the object.
profileNamestring: BasicA sequence of charactersActivated profile name.
reservCpuscalar: Unit32Range: [0, 4294967295]Amount of reserved CPU in units
reservDiskscalar: Unit64 - Amount of reserved disk space in MB.
reservMemscalar: Unit64 - Amount of reserved memory in MB.
rnreference: BinRN - Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
runCmdstring: BasicA sequence of charactersRun-time command used.
runOptstring: BasicA sequence of charactersRun-time options used.
statestring: BasicA sequence of charactersCurrent state of application.


apphostingAppNetUtil Properties

The following table contains information about the apphostingAppNetUtil properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeValuesDescription
intfNamestring: BasicA sequence of charactersInterface name of the network.
modTsmo: TStamp
(scalar: Date)
Selection:
0 to never
Default: never
The time when this object was last modified.
namestring: BasicA sequence of charactersThe name of the object.
rnreference: BinRN - Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
rxBytesscalar: Unit64 - Number of octets received by the application.
rxErrorsscalar: Unit64 - Number of errors received by the application.
rxPacketsscalar: Unit64 - Number of packets received by the application.
txBytesscalar: Unit64 - Number of octets transmitted by the application.
txErrorsscalar: Unit64 - Number of errors transmitted by the application.
txPacketsscalar: Unit64 - Number of packets transmitted by the application.


apphostingAppDevice Properties

The following table contains information about the apphostingAppDevice properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeValuesDescription
devAliasstring: BasicA sequence of charactersAlias name of the attached device.
devNamestring: BasicA sequence of charactersName of the attached device.
devTypestring: BasicA sequence of charactersType of the attached device.
modTsmo: TStamp
(scalar: Date)
Selection:
0 to never
Default: never
The time when this object was last modified.
namestring: BasicA sequence of charactersThe name of the object.
rnreference: BinRN - Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.


apphostingAppNetIntf Properties

The following table contains information about the apphostingAppNetIntf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeValuesDescription
intfNamestring: BasicA sequence of charactersInterface name of the network.
ipV4Addrstring: BasicA sequence of charactersAddress of ipv4 network interface.
ipV6Addrstring: BasicA sequence of charactersAddress of ipv6 network interface.
macAddrstring: BasicA sequence of charactersMac address of the network interface.
modTsmo: TStamp
(scalar: Date)
Selection:
0 to never
Default: never
The time when this object was last modified.
namestring: BasicA sequence of charactersThe name of the object.
netNamestring: BasicA sequence of charactersThe name of the network.
rnreference: BinRN - Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
apphostingAppResource sys/appmgrstat/appresource


apphostingAppResource Properties

The following table contains information about the apphostingAppResource properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeValuesDescription
cpuAvailscalar: Unit32Range: [0, 4294967295]Amount of total system available CPU in units.
cpuQuotascalar: Unit32Range: [0, 4294967295]Amount of total system reserved CPU in units.
dnreference: BinRef - A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
memAvailscalar: Unit32Range: [0, 4294967295]Amount of available memory in MB.
memQuotascalar: Unit32Range: [0, 4294967295]Amount of reserved memory in MB.
modTsmo: TStamp
(scalar: Date)
Selection:
0 to never
Default: never
The time when this object was last modified.
namestring: BasicA sequence of charactersThe name of the object.
storageAvailscalar: Unit32Range: [0, 4294967295]Amount of available storage in MB.
storageQuotascalar: Unit32Range: [0, 4294967295]Amount of reserved storage in MB.


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html