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_1show app-hosting resourceshow 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.
| MO | DN |
|---|---|
| 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 Name | Data Type | Values | Description |
|---|---|---|---|
| appId | string: Basic | A sequence of characters | Unique Id of the application |
| dn | reference: BinRef | - | A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module |
| modTs | mo: 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 Name | Data Type | Values | Description |
|---|---|---|---|
| cpuAlloc | scalar: Unit32 | Range: [0, 4294967295] | Allocated CPU in units |
| cpuUsed | scalar: Unit64 | - | Actual CPU used in percentage |
| diskAlloc | scalar: Unit64 | - | Disk space allocation in MB |
| diskUsed | scalar: Unit64 | - | Actual disk space used in MB |
| memAlloc | scalar: Unit64 | - | Memory allocation in MB |
| memUsed | scalar: Unit64 | - | Actual memory used in KB |
| modTs | mo: TStamp (scalar: Date) | Selection: 0 to never Default: never | The time when this object was last modified |
| name | string: Basic | A sequence of characters | The name of the object |
| rn | reference: 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 Name | Data Type | Values | Description |
|---|---|---|---|
| appAuthor | string: Basic | A sequence of characters | Author info from application package. |
| appDesc | string: Basic | A sequence of characters | Description available in the package |
| appName | string: Basic | A sequence of characters | Unique Id used to host application. |
| appOwner | string: Basic | A sequence of characters | Name of the process which creates the application. |
| appType | string: Basic | A sequence of characters | Type of application 'docker'. |
| appVer | string: Basic | A sequence of characters | Installed version of the application. |
| modTs | mo: TStamp (scalar: Date) | Selection: 0 to never Default: never | The time when this object was last modified. |
| name | string: Basic | A sequence of characters | The name of the object. |
| pkgName | string: Basic | A sequence of characters | Application package name. |
| pkgPath | string: Basic | A sequence of characters | Application package path. |
| pkgUrl | string: Basic | A sequence of characters | Application package URL. |
| rn | reference: 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 Name | Data Type | Values | Description |
|---|---|---|---|
| entryPoint | string: Basic | A sequence of characters | Run-time entry point used. |
| guestIntf | string: Basic | A sequence of characters | Guest interface name. |
| healthStatus | string: Basic | A sequence of characters | Container health status. |
| lastHealthErr | string: Basic | A sequence of characters | Last health probe error. |
| lastHealthOut | string: Basic | A sequence of characters | Last health probe output. |
| modTs | mo: TStamp (scalar: Date) | Selection: 0 to never Default: never | The time when this object was last modified. |
| name | string: Basic | A sequence of characters | The name of the object. |
| profileName | string: Basic | A sequence of characters | Activated profile name. |
| reservCpu | scalar: Unit32 | Range: [0, 4294967295] | Amount of reserved CPU in units |
| reservDisk | scalar: Unit64 | - | Amount of reserved disk space in MB. |
| reservMem | scalar: Unit64 | - | Amount of reserved memory in MB. |
| rn | reference: BinRN | - | Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names. |
| runCmd | string: Basic | A sequence of characters | Run-time command used. |
| runOpt | string: Basic | A sequence of characters | Run-time options used. |
| state | string: Basic | A sequence of characters | Current 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 Name | Data Type | Values | Description |
|---|---|---|---|
| intfName | string: Basic | A sequence of characters | Interface name of the network. |
| modTs | mo: TStamp (scalar: Date) | Selection: 0 to never Default: never | The time when this object was last modified. |
| name | string: Basic | A sequence of characters | The name of the object. |
| rn | reference: BinRN | - | Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names. |
| rxBytes | scalar: Unit64 | - | Number of octets received by the application. |
| rxErrors | scalar: Unit64 | - | Number of errors received by the application. |
| rxPackets | scalar: Unit64 | - | Number of packets received by the application. |
| txBytes | scalar: Unit64 | - | Number of octets transmitted by the application. |
| txErrors | scalar: Unit64 | - | Number of errors transmitted by the application. |
| txPackets | scalar: 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 Name | Data Type | Values | Description |
|---|---|---|---|
| devAlias | string: Basic | A sequence of characters | Alias name of the attached device. |
| devName | string: Basic | A sequence of characters | Name of the attached device. |
| devType | string: Basic | A sequence of characters | Type of the attached device. |
| modTs | mo: TStamp (scalar: Date) | Selection: 0 to never Default: never | The time when this object was last modified. |
| name | string: Basic | A sequence of characters | The name of the object. |
| rn | reference: 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 Name | Data Type | Values | Description |
|---|---|---|---|
| intfName | string: Basic | A sequence of characters | Interface name of the network. |
| ipV4Addr | string: Basic | A sequence of characters | Address of ipv4 network interface. |
| ipV6Addr | string: Basic | A sequence of characters | Address of ipv6 network interface. |
| macAddr | string: Basic | A sequence of characters | Mac address of the network interface. |
| modTs | mo: TStamp (scalar: Date) | Selection: 0 to never Default: never | The time when this object was last modified. |
| name | string: Basic | A sequence of characters | The name of the object. |
| netName | string: Basic | A sequence of characters | The name of the network. |
| rn | reference: 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.
| MO | DN |
|---|---|
| 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 Name | Data Type | Values | Description |
|---|---|---|---|
| cpuAvail | scalar: Unit32 | Range: [0, 4294967295] | Amount of total system available CPU in units. |
| cpuQuota | scalar: Unit32 | Range: [0, 4294967295] | Amount of total system reserved CPU in units. |
| dn | reference: BinRef | - | A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. |
| memAvail | scalar: Unit32 | Range: [0, 4294967295] | Amount of available memory in MB. |
| memQuota | scalar: Unit32 | Range: [0, 4294967295] | Amount of reserved memory in MB. |
| modTs | mo: TStamp (scalar: Date) | Selection: 0 to never Default: never | The time when this object was last modified. |
| name | string: Basic | A sequence of characters | The name of the object. |
| storageAvail | scalar: Unit32 | Range: [0, 4294967295] | Amount of available storage in MB. |
| storageQuota | scalar: Unit32 | Range: [0, 4294967295] | Amount of reserved storage in MB. |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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: