I'm trying to get agent connection status to see which agents are offline or having issue connecting so i can recycle them by using this rest api https://<server>:8021/rest/management/agents.
1) don't see any agent status or connection state.
2) There's an "instrumentation state" which can be helpful but it's not exist for nodejs.
<connected> attribute only give true or false. This is always true even when agent is connected but instrumentation is disabled.
Status, connection State, or instrumentation state attribute would give me more detail but they're not available in api.
instrumentation state is available in api but doesn't exist for nodejs agents.
I understand what you're needing. If Instrumentation state is not being provided in the REST interface, I would open a support case and see what the support team suggests. Perhaps it's a bug, I don't know.