Splunk AppDynamics

Missing machine tags in api response

aa_aa
New Member

Running machine agent:

 2023-07-11 01:36:28.654 Using Agent Version [Machine Agent v23.6.0.3657 GA compatible with 4.4.1.0 Build Date 2023-06-22 09:28:42]
..
.. 
2023-07-11 01:36:33.954 Started AppDynamics Machine Agent Successfully.

Added custom tags to the configuration as described here and validated they show up in the UI:

image.png

Running an API call:

<appdynamics-controller>/controller/sim/v2/user/machines?type=CONTAINER&format=LITE&offset=0&limit=-1 

get the vm back but the tags are empty:

{"hostId":"aaa","name":"aaa","hierarchy":[],"properties":{"Processor|Logical Core Count":"2","vCPU":"2","Processor|Physical Core Count":"2","OS|Architecture":"x86_64","Hostname":"aaa","Bios|Version":"1.15.0-1","AppDynamics|Agent|Agent version":"Machine Agent v23.6.0.3657 GA compatible with 4.4.1.0 Build Date 2023-06-22 09:28:42","AppDynamics|Agent|Install Directory":"/root/appd_agent","OS|Kernel|Release":"5.14.0-307.el9.x86_64","AppDynamics|Agent|Build Number":"cdd5a21","AppDynamics|Machine Type":"NON_CONTAINER_MACHINE_AGENT","OS|Kernel|Name":"Linux","AppDynamics|Agent|Machine Info":"os.name=Linux|os.arch=amd64|os.version=5.14.0-307.el9.x86_64","Total|CPU|Logical Processor Count":"2","AppDynamics|Agent|JVM Info":"java.vm.name=OpenJDK 64-Bit Server VM|java.vendor=Azul Systems, Inc.|java.version=11.0.19|user.language=en|user.country=US|user.variant=unknown"},
"tags":{},"agentConfig":{"rawConfig":{}},"id":16583826,"memory":{},"volumes":[],"cpus":[],"networkInterfaces":[],"controllerConfig":{"rawConfig":{}},"simEnabled":true,"simNodeId":23402361,"dynamicMonitoringMode":"KPI","type":"PHYSICAL","historical":false},

*as you can see -> "tags":{}

Some additional logs from the agent:

[system-thread-0] 11 Jul 2023 01:37:04,274 DEBUG ConfigurationManager - Building configuration types for 'ServerMonitoring' -> {samplingInterval=30000, networkMonitorConfig={maxNumberNetworks=5, whitelistSelectorRegex=, blacklistSelectorRegex=^veth.*|^vnet.*}, defaultDiskSectorSize=512, memoryMonitorConfig={samplingInterval=3000}, basicEnabled=true, volumeMonitorConfig={maxNumberVolumes=5, whitelistSelectorRegex=, blacklistSelectorRegex=^/var/lib/docker/.*, samplingInterval=3000}, processMonitorConfig={maxClassIdLength=50, processSelectorRegex=^.+[^]]$, minLiveTimeMillisBeforeMonitoring=60000, maxNumberMonitoredClasses=20, defaultProcessClassSelector=}, percentileMonitorConfig={percentileEnabled=true}, tags={environment=[production], testingTagKey=[testingTagValue]}, cpusMonitorConfig={samplingInterval=3000}}

Should I add something to the API call? Is it a bug?

Thx!

Labels (1)
0 Karma
1 Solution

Hiroki_Ito
Contributor

Hi @aa.aa ,

Thank you for your reply.
I'm afraid I don't think we can get all the machines with their tags with only 1 API execution.
However, as "controller/sim/v2/user/machines" API returns the machine IDs, we can extract IDs by using a library like jq .
Then, we can iterate through the ids to execute "controller/sim/v2/user/machines/<machineId>" API for each machine id.
 
Best regards,
Hiroki

View solution in original post

0 Karma

aa_aa
New Member

Great thx a lot for the help:)

0 Karma

Hiroki_Ito
Contributor

Hello @aa.aa ,

 
Thank you for posting to the community.
To get tags of the machine, could you please use the API below by specifying the target machine id?
GET <appdynamics-controller>/controller/sim/v2/user/machines/<machineId>
You can find the machine id from the URL when opening the target machine from the controller.
 image.png

You can also find the id in the response of the "controller/sim/v2/user/machines" API as well.
 
Best Regards,
Hiroki
0 Karma

aa_aa
New Member

Ok thx but is there a way to get all the machines with their tags instead of getting them one by one?

0 Karma

Hiroki_Ito
Contributor

Hi @aa.aa ,

Thank you for your reply.
I'm afraid I don't think we can get all the machines with their tags with only 1 API execution.
However, as "controller/sim/v2/user/machines" API returns the machine IDs, we can extract IDs by using a library like jq .
Then, we can iterate through the ids to execute "controller/sim/v2/user/machines/<machineId>" API for each machine id.
 
Best regards,
Hiroki
0 Karma

iamryan
Community Manager
Community Manager

Hello @aa.aa,

Let's see if the community can jump in and help out. If you think something might be a bug, it would be best to also report that via Support.

How do I submit a Support ticket? An FAQ 

If you do submit a ticket and hear back from Support, could you please share any learnings back here as a reply? 

Also, thanks for sharing the Docs resource, did you think everything was clear on that Doc? I can share feedback with the team if you think something was missing or unclear on that page.

0 Karma

aa_aa
New Member

Hi thx for the replay.

Docs look ok, some wired loop links here and there but nothing much more..

But I did not find a proper api doc explaining what type call I can make and what should I expect as a response?

0 Karma

Hiroki_Ito
Contributor

Hello @aa.aa ,

Thank you for your reply.
This is an internal API and is not an official API(which is documented in AppDynamics APIs), so we don't have any public specifications/documents for this API.
Although we can try to use the API, it could also change in the future without notice as this is an internal API.

Best regards,
Hiroki
 
0 Karma
Get Updates on the Splunk Community!

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud? Learn how unique features like ...