AppD Archive

API for Server Visibility enabled Machine Agents

Bradley_Owen
Engager

CONFIDENTIAL | Subject to Integration Partner Program Agreement

The information in this documentation for API for Server Visibility Enabled Machine Agents is AppDynamics confidential information and subject to the Integration Partner Program Agreement between you and AppDynamics.

The scope of this article is to briefly describe the API used to fetch the underlying server or container details monitored by machine agents with server visibility enabled.

About the API

This API is accessible to any user with the VIEW_SIM permission.

HTTP method

Path

Query Params

Accessible to user with only VIEW_SIM permission?

GET

/controller/sim/v2/user/machines

appIds, tierIds, nodeIds, format, tags, types, offset, limit

Yes

Query Params

Parameter

Description

Data Type

Default

Required

appIds

Application IDs as provided in the Application Model APIs documentation

integer

No

Maybe*

tierIds

Tier ids as provided in the Tier Model APIs documentation

*If requesting information for a tier, appids is also required

integer

No

Maybe*

nodeIds

Node IDs as provided in the Node Model APIs documentation

*If requesting information for a node, appids and tierids are both required

integer

No

No

format

tags

This is a Map of String to a Set of Strings. The key of the map is the tagKey and the Value corresponding to it is the Set of tagValues.

The value can be an empty set also, That will filter the results based on the presence of tagKey. Example values:

"tags": { "tagKey":[] }

"tags": { "tagKey":["tagValue1"]}

"tags": { "tagKey":["tagValue1", "tagValue2"]}

 

No

No

types

This is the Set of type of machines. The possible values for this field can be combination of following: "PHYSICAL", "CONTAINER_AWARE", "CONTAINER"

  • types=CONTAINER
    if the APM agent is running inside a container, returns information about the container(s) of the requested appids, tierids, nodeids
  • types=CONTAINER_AWARE
    returns information about the SIM agent running on the same host as the requested appids, tierids, nodeids
  • types=PHYSICAL
    if the SIM agent is running on the OS (and not in a container)

string

No

No

offset

Offset for pagination

integer

0

No

limit

Controls the size of the response.

integer

100

No

Sample Requests and Responses

Following, see two different sample requests and responses:

Get Container Details – Sample Request and Response

Below is a sample request to query the container details where appIds, tierIds and nodeIds are provided as a query param.

curl -u user@account:password
http://your-controller-name.appdynamics.com/controller/sim/v2/user/machines?appIds=255&tierIds=652&nodeIds=208006&format=FULL&tags=&types=CONTAINER

NOTE: For on-prem or dedicated SaaS, account is normally "customer1"

Sample Response: Get Container Details

Click "Learn more" for the Get Container Details sample code:

Spoiler
[
  {
    "hostId": "ceb66eaffcd2",
    "name": "ceb66eaffcd2",
    "hierarchy": [
      "Containers",
      "docker-data-services-v2"
    ],
    "properties": {
      "Container|CPU|Set": "",
      "Container|CPU|CPUs": "0",
      "Container|Id": "abcd1234abcd",
      "Container|Memory|Reservation (MB)": "0",
      "Container|Image|Name": "123456789012.dkr.ecr.us-west-2.amazonaws.com/ad_devops_mongo_data_services@sha256:abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234",
      "Container|Name": "k8s_devops-data-services-mongo_devops-data-services-mongo-12345678ff-4zqbb_ad-devops-demo1_1bffb346-0013-11ea-87c5-aa12345678_0",
      "Container|Network|Mode": "container:abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234",
      "Container|Image|Id": "abcd12345675",
      "Container|Started At": "2019-11-05T21:28:45.134470046Z",
      "Container|Image|Full Id": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234",
      "AppDynamics|Machine Type": "NON_CONTAINER_MACHINE_AGENT",
      "Container|Memory|Limit": "7681",
      "Container|Full Id": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234",
      "Container|Memory|Swap": "0",
      "Container|Hostname": "demo-hostname",
      "Container|Network|Ports": "",
      "Container|CPU|Share": "2",
      "Container|Created At": "2019-11-05T21:28:43.163296942Z"
    },
    "tags": {},
    "agentConfig": {
      "rawConfig": {
        "_features": {
          "features": [
            "basic",
            "sim",
            "dmm"
          ],
          "reason": {
            "message": "",
            "code": ""
          }
        },
        "_agentRegistrationRequestConfig": {
          "machineInfo": "os.name=linux|os.arch=amd64|os.version=unknown",
          "jvmInfo": "java.vm.name=OpenJDK 64-Bit Server VM|java.vendor=Oracle Corporation|java.version=1.8.0_212|user.language=en|user.country=unknown|user.variant=unknown",
          "installDirectory": "/sharedFiles/MachineAgent",
          "agentVersion": "Machine Agent v4.5.12.2205 GA compatible with 4.4.1.0 Build Date 2019-06-25 06:53:16",
          "tierName": null,
          "nodeName": null,
          "applicationNames": [],
          "autoRegisterAgent": true,
          "agentType": "MACHINE_AGENT"
        },
        "_machineInstanceRegistrationRequestConfig": {
          "forceMachineInstanceRegistration": false
        },
        "_dotnetRegistrationRequestConfig": {
          "dotnetCompatibilityMode": false
        },
        "_descriptorConfig": {
          "descriptors": {}
        },
        "_agentRegistrationSupplementalConfig": {
          "simMachineType": "CONTAINER",
          "hostSimMachineId": 2096,
          "historical": false,
          "hostName": "demo-hostname",
          "containerType": "APM"
        }
      }
    },
    "id": 2092,
    "memory": {},
    "volumes": [
      {
        "mountPoint": "/var/lib/kubelet/pods/abcd1234-0013-11ea-87c5-abcd12345678/containers/devops-data-services-mongo/abcd1234",
        "partition": null,
        "properties": {
          "Destination": "/dev/termination-log",
          "Source": "/var/lib/kubelet/pods/abcd1234-0013-11ea-87c5-abcd123456578/containers/devops-data-services-mongo/abcd1234",
          "Type": "bind"
        }
      },
      {
        "mountPoint": "/var/lib/kubelet/pods/abcd1234-0013-11ea-87c5-abcd12345678/volumes/kubernetes.io~empty-dir/shared-files",
        "partition": null,
        "properties": {
          "Destination": "/sharedFiles",
          "Source": "/var/lib/kubelet/pods/abcd1234-0013-11ea-87c5-abcd12345678/volumes/kubernetes.io~empty-dir/shared-files",
          "Type": "bind"
        }
      },
      {
        "mountPoint": "/var/lib/kubelet/pods/abcd1234-0013-11ea-87c5-abcd12345678/volumes/kubernetes.io~secret/default-token-k49jh",
        "partition": null,
        "properties": {
          "Destination": "/var/run/secrets/kubernetes.io/serviceaccount",
          "Source": "/var/lib/kubelet/pods/abcd1234-0013-11ea-87c5-abcd12345678/volumes/kubernetes.io~secret/default-token-k49jh",
          "Type": "bind"
        }
      },
      {
        "mountPoint": "/var/lib/kubelet/pods/abcd1234-0013-11ea-87c5-abcd12345678/etc-hosts",
        "partition": null,
        "properties": {
          "Destination": "/etc/hosts",
          "Source": "/var/lib/kubelet/pods/abcd1234-0013-11ea-87c5-abcd12345678/etc-hosts",
          "Type": "bind"
        }
      }
    ],
    "cpus": [],
    "networkInterfaces": [
      {
        "name": "eth0",
        "macAddress": null,
        "ip4Address": null,
        "ip6Address": null,
        "properties": {}
      }
    ],
    "controllerConfig": {
      "rawConfig": {
        "_features": {
          "features": [
            "dmm",
            "sim"
          ],
          "reason": {
            "message": "",
            "code": ""
          }
        },
        "_dotnetRegistrationRequestConfig": {
          "dotnetCompatibilityMode": false
        },
        "_agentRegistrationSupplementalConfig": {
          "simMachineType": "CONTAINER",
          "hostSimMachineId": 2096,
          "historical": false,
          "hostName": "demo-hostname",
          "containerType": "APM"
        },
        "_machineInstanceRegistrationRequestConfig": {
          "forceMachineInstanceRegistration": false
        },
        "_agentRegistrationRequestConfig": {
          "machineInfo": "os.name=linux|os.arch=amd64|os.version=unknown",
          "jvmInfo": "java.vm.name=OpenJDK 64-Bit Server VM|java.vendor=Oracle Corporation|java.version=1.8.0_212|user.language=en|user.country=unknown|user.variant=unknown",
          "installDirectory": "/sharedFiles/MachineAgent",
          "agentVersion": "Machine Agent v4.5.12.2205 GA compatible with 4.4.1.0 Build Date 2019-06-25 06:53:16",
          "tierName": null,
          "nodeName": null,
          "applicationNames": [],
          "autoRegisterAgent": true,
          "agentType": "MACHINE_AGENT"
        }
      }
    },
    "simEnabled": true,
    "simNodeId": 208001,
    "dynamicMonitoringMode": "KPI",
    "type": "CONTAINER",
    "historical": false
  }
]

Get Server Host Details – Sample Request and Response

Use this format when the SIM agent is installed in a container and you want host information.  Below is a sample request to query the server host details where appIds, tierIds and nodeIds are provided as a query param.

curl -u user@account:password
http://your-controller-name.appdynamics.com/controller/sim/v2/user/machines?appIds=255&tierIds=652&nodeIds=208006&format=FULL&tags=&types=CONTAINER_AWARE

Note: For on-prem or dedicated SaaS, account is normally "customer1"

Sample Response: Get Server Host Details

Click "Learn more" for the Get Server Host Details sample code:

Spoiler
[
    {
        "hostId": "demo-hostid",
        "name": "demo-hostname.domain.internal",
        "hierarchy": [
            "appd-mgmt-demo1"
        ],
        "properties": {
            "OS|Architecture": "x86_64",
            "Hostname": "demo-hostname.domain.internal",
            "Bios|Version": "1.0",
            "AppDynamics|Agent|Agent version": "Machine Agent v4.5.12.2205 GA compatible with 4.4.1.0 Build Date 2019-06-25 06:53:16",
            "AppDynamics|Agent|Install Directory": "/sharedFiles/MachineAgent",
            "OS|Kernel|Release": "4.14.146-119.123.amzn2.x86_64",
            "AppDynamics|Agent|Build Number": "67aca46",
            "AppDynamics|Machine Type": "DOCKER_MACHINE_AGENT",
            "OS|Kernel|Name": "Linux",
            "AppDynamics|Agent|Machine Info": "os.name=Linux|os.arch=amd64|os.version=4.14.146-119.123.amzn2.x86_64",
            "Total|CPU|Logical Processor Count": "2",
            "AppDynamics|Agent|JVM Info": "java.vm.name=OpenJDK 64-Bit Server VM|java.vendor=Oracle Corporation|java.version=1.8.0_212|user.language=en|user.country=unknown|user.variant=unknown",
            "Disk|/dev/nvme0n1p1|Sector Size Bytes": "512"
        },
        "tags": {},
        "agentConfig": {
            "rawConfig": {
                "_features": {
                    "features": [
                        "basic",
                        "sim",
                        "dmm"
                    ],
                    "reason": {
                        "message": "",
                        "code": ""
                    }
                },
                "_agentRegistrationRequestConfig": {
                    "machineInfo": "os.name=Linux|os.arch=amd64|os.version=4.14.146-119.123.amzn2.x86_64",
                    "jvmInfo": "java.vm.name=OpenJDK 64-Bit Server VM|java.vendor=Oracle Corporation|java.version=1.8.0_212|user.language=en|user.country=unknown|user.variant=unknown",
                    "installDirectory": "/sharedFiles/MachineAgent",
                    "agentVersion": "Machine Agent v4.5.12.2205 GA compatible with 4.4.1.0 Build Date 2019-06-25 06:53:16",
                    "tierName": null,
                    "nodeName": null,
                    "applicationNames": [],
                    "autoRegisterAgent": true,
                    "agentType": "MACHINE_AGENT"
                },
                "_machineInstanceRegistrationRequestConfig": {
                    "forceMachineInstanceRegistration": false
                },
                "_dotnetRegistrationRequestConfig": {
                    "dotnetCompatibilityMode": false
                },
                "_descriptorConfig": {
                    "descriptors": {}
                },
                "_agentRegistrationSupplementalConfig": {
                    "simMachineType": "CONTAINER_AWARE",
                    "hostSimMachineId": null,
                    "historical": false,
                    "hostName": null,
                    "containerType": null
                }
            }
        },
        "id": 2096,
        "memory": {
            "Swap": {
                "sizeMb": 0,
                "type": "Swap",
                "properties": {}
            },
            "Physical": {
                "sizeMb": 7681,
                "type": "Physical",
                "properties": {}
            }
        },
        "volumes": [
            {
                "mountPoint": "/",
                "partition": "name12345",
                "properties": {
                    "Size (MB)": "20468",
                    "PartitionMetricName": "dev-name12345",
                    "VolumeMetricName": "/"
                }
            }
        ],
        "cpus": [
            {
                "cpuId": "0",
                "coreCount": 1,
                "logicalCount": 2,
                "properties": {
                    "Flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke",
                    "Vendor": "GenuineIntel",
                    "Model Name": "Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz",
                    "Max Speed MHz": "2500"
                }
            }
        ],
        "networkInterfaces": [
            {
                "name": "abcd12345678ab",
                "macAddress": "A1:B2:C3:D4:E5:F6",
                "ip4Address": "unknown value",
                "ip6Address": "0:0:0:0:0:0:0:1/64 [link]",
                "properties": {
                    "Plugged In": "yes",
                    "IPv6 Default Gateway": "",
                    "MetricName": "abcd12345678ab",
                    "Speed": "10000",
                    "IPv4 Default Gateway": "",
                    "Enabled": "yes",
                    "Operational State": "up",
                    "Duplex": "full",
                    "MTU": "1500"
                }
            },
            {
                "name": "abce123456789ed",
                "macAddress": "A1:B2:C3:D4:E5:F6",
                "ip4Address": "unknown value",
                "ip6Address": "0:0:0:0:0:0:0:1/64 [link]",
                "properties": {
                    "Plugged In": "yes",
                    "IPv6 Default Gateway": "",
                    "MetricName": "abcd12345678",
                    "Speed": "10000",
                    "IPv4 Default Gateway": "",
                    "Enabled": "yes",
                    "Operational State": "up",
                    "Duplex": "full",
                    "MTU": "1500"
                }
            },
            {
                "name": "eth2",
                "macAddress": "A1:B2:C3:D4:E5:F6",
                "ip4Address": "unknown value",
                "ip6Address": "0:0:0:0:0:0:0:1/64 [link]",
                "properties": {
                    "IPv6 Default Gateway": "",
                    "Plugged In": "yes",
                    "MetricName": "eth2",
                    "Speed": "0",
                    "IPv4 Default Gateway": "",
                    "Enabled": "yes",
                    "Operational State": "up",
                    "Duplex": "unknown",
                    "MTU": "1500"
                }
            },
            {
                "name": "eth1",
                "macAddress": "A1:B2:C3:D4:E5:F6",
                "ip4Address": "unknown value",
                "ip6Address": "0:0:0:0:0:0:0:1/64 [link]",
                "properties": {
                    "Plugged In": "yes",
                    "IPv6 Default Gateway": "",
                    "MetricName": "eth1",
                    "Speed": "0",
                    "IPv4 Default Gateway": "",
                    "Enabled": "yes",
                    "Operational State": "up",
                    "Duplex": "unknown",
                    "MTU": "1500"
                }
            },
            {
                "name": "eth0",
                "macAddress": "A1:B2:C3:D4:E5:F6",
                "ip4Address": "127.0.0.1/19",
                "ip6Address": "0:0:0:0:0:0:0:1/64 [link]",
                "properties": {
                    "Plugged In": "yes",
                    "IPv6 Default Gateway": "",
                    "MetricName": "eth0",
                    "Speed": "0",
                    "IPv4 Default Gateway": "127.0.0.1",
                    "Enabled": "yes",
                    "Operational State": "up",
                    "Duplex": "unknown",
                    "MTU": "9001"
                }
            }
        ],
        "controllerConfig": {
            "rawConfig": {
                "_features": {
                    "features": [
                        "dmm",
                        "sim"
                    ],
                    "reason": {
                        "message": "",
                        "code": ""
                    }
                },
                "_dotnetRegistrationRequestConfig": {
                    "dotnetCompatibilityMode": false
                },
                "_agentRegistrationSupplementalConfig": {
                    "simMachineType": "CONTAINER_AWARE",
                    "hostSimMachineId": null,
                    "historical": false,
                    "hostName": null,
                    "containerType": null
                },
                "_machineInstanceRegistrationRequestConfig": {
                    "forceMachineInstanceRegistration": false
                },
                "_agentRegistrationRequestConfig": {
                    "machineInfo": "os.name=Linux|os.arch=amd64|os.version=4.14.146-119.123.amzn2.x86_64",
                    "jvmInfo": "java.vm.name=OpenJDK 64-Bit Server VM|java.vendor=Oracle Corporation|java.version=1.8.0_212|user.language=en|user.country=unknown|user.variant=unknown",
                    "installDirectory": "/sharedFiles/MachineAgent",
                    "agentVersion": "Machine Agent v4.5.12.2205 GA compatible with 4.4.1.0 Build Date 2019-06-25 06:53:16",
                    "tierName": null,
                    "nodeName": null,
                    "applicationNames": [],
                    "autoRegisterAgent": true,
                    "agentType": "MACHINE_AGENT"
                }
            }
        },
        "simEnabled": true,
        "simNodeId": 208008,
        "dynamicMonitoringMode": "KPI",
        "type": "CONTAINER_AWARE",
        "historical": false
    }
]​

Recommended response attributes

The following table shows recommended response attributes that are useful for an integration.

Recommended Response Attribute

name

Hostname

os from “AppDynamics|Agent|Machine Info”

agentVersion

networkInterfaces (name, ip4Address, ip6Address, macAddress)

Container|Id

Container|Full Id

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Developer Program!

Hey Splunk community! We are excited to announce that Splunk is launching the Splunk Developer Program in ...

Splunkbase Year in Review 2024

Reflecting on 2024, it’s clear that innovation and collaboration have defined the journey for Splunk ...

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...