cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Missing machine tags in api response

aa.aa
Wanderer

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:

aaaa_0-1689065586533.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!

7 REPLIES 7

Ryan.Paredez
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.

 

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.


Thanks,

Ryan, Cisco AppDynamics Community Manager




Found something helpful? Click the Accept as Solution button to help others find answers faster.

Liked something? Click the Thumbs Up button.



Check out Observabiity in Action

new deep dive videos weekly in the Knowledge Base.

Hiroki.Ito
AppDynamics Team

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.
 URL.png

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

Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

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?

 

Hiroki.Ito
AppDynamics Team

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
 

Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

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

Hiroki.Ito
AppDynamics Team

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

Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

aa.aa
Wanderer

Great thx a lot for the help:)