Skip to content

appd get-server

Retrieve database server

Description

Returns single DB server if ID is provided. Else, returns all servers

Synopsis

appd get-server
    [--site <site>]
    [--cluster <cluster>]
    [<id>]

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

cluster - (string)

     Name of elastic search cluster
     Example: --cluster "appdynamics-default"
     Default: appdynamics-default      Attributes: optional

id - (int)

     DB server ID for retrieving the DB Server
     Example: 418
     Default: _None_      Attributes: optional

Examples

Input:

x = ! appd get-server 418
Output:
{
  "id": 418,
  "version": 0,
  "name": "test",
  "nameUnique": true,
  "nodeId": 932032,
  "configId": 562,
  "role": "STANDALONE",
  "type": "MONGO",
  "backendIds": [],
  "internalName": "dbmon:562",
  "createdOn": 1664451698000,
  "modifiedOn": 1664524182000,
  "host": "LOCALHOST",
  "port": 27017,
  "ipAddress": "192.168.49.1|172.18.0.1|172.17.0.1|192.168.5.159",
  "simMachineId": 0,
  "cpuCores": 4,
  "uniqueHostId": "beehyv-Default-string",
  "metadataProps": [
    {
      "key": "version",
      "value": "4.4"
    }
  ]
}
Input:
! appd get-server 418
Output:
ID  VERSION NAME    CONFIG ID   ROLE        TYPE    CREATED ON              MODIFIED ON             HOST        PORT    IP ADDRESS                                       
418       0 test          562   STANDALONE  MONGO   2022-09-29T11:41:38Z    2022-09-30T07:49:42Z    LOCALHOST   27017   192.168.49.1|172.18.0.1|172.17.0.1|192.168.5.159
Input:
! appd get-server
Output:
ID  VERSION NAME    CONFIG ID   ROLE        TYPE    CREATED ON              MODIFIED ON             HOST        PORT    IP ADDRESS                                       
418       0 test          562   STANDALONE  MONGO   2022-09-29T11:41:38Z    2022-09-30T07:49:42Z    LOCALHOST   27017   192.168.49.1|172.18.0.1|172.17.0.1|192.168.5.159                                       
418       0 test                      562   STANDALONE  MONGO   2022-09-29T11:41:38Z    2022-09-30T07:49:42Z    LOCALHOST   27017   192.168.49.1|172.18.0.1|172.17.0.1|192.168.5.159    
420       0 s                         564   STANDALONE  MONGO   2022-09-29T12:28:10Z    2022-09-30T07:49:42Z    LOCALHOST   27017   192.168.49.1|172.18.0.1|172.17.0.1|192.168.5.159    
421       0 b                         565   STANDALONE  MONGO   2022-09-29T12:28:20Z    2022-09-30T07:49:42Z    LOCALHOST   27017   192.168.49.1|172.18.0.1|172.17.0.1|192.168.5.159    
426       0 sample collector          571   STANDALONE  MONGO   2022-09-30T09:01:00Z    2022-09-30T09:01:00Z    LOCALHOST   27017   192.168.49.1|172.18.0.1|172.17.0.1|192.168.5.159

Access Control

To use this command, you need access to the following:

Field Value
Action "read"
Service Type "appd"
Service Instance cluster
Namespace
Object Type "database"
Object ID id

Please see Access Control for details.