ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

RA Agent API to check status

book

Article ID: 186575

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio) CA Release Automation - DataManagement Server (Nolio)

Issue/Introduction

Is there any APIs available to check agent status with Node ID or IP. 

https://NAC-IP:8443/datamanagement/a/agentsPage?filter=abc*

but is it possible to check with exact name or list of node IDs instead of all.


Environment

Release : 6.5, 6.6, 6.7 or higher.

Component : CA RELEASE AUTOMATION RELEASE OPERATIONS CENTER

Resolution

As per validation internally, below are some findings. There is no direct API by which you can access the agent-status.

1: The mentioned https://NAC-IP:8443/datamanagement/a/agentsPage?filter=abc*   -> API where you mentioned reg-ex filter is working, I don't think filter is taking reg-ex instead it try to match characters filter criteria to node-id, i.e. if the node-id. So it is only returning the list of agents which have abc in the node-id.

The only way I can say currently is to loop through and make a rest call for each node i.e. 

https://NAC-IP:8443/datamanagement/a/agentsPage?filter=abc01 -> This will list out the details of all agents with node-id abc01
https://NAC-IP:8443/datamanagement/a/agentsPage?filter=abc02 -> This will list out the details of all agents with node-id abc02

However, it will not restrict the response to return some node-ids which you may not be interested in.

Additional Information

Our recommend is to make a single call getting w.r.t groups if any and filter the JSON response based on custom java-script.

https://NAC-IP:8443/datamanagement/a/agentsPage?filter=&orderBy=&pageSize=50&pageStart=0

For example:
java script to filter based on name consisting 'ibn' and reachable status is true

rest_query_response='{"list":[{"usageCount":"4","serverGroups":...........]}'

json_data=JSON.parse(rest_query_response)

array_object=Array(json_data.list)[0]

result=array_object.filter(x=>x.name.includes('ibn') & x.reachable===true)