# How to Check how many agents are reporting to one ActiveGate

**URL:** <https://community.dynatrace.com/t/how-to-check-how-many-agents-are-reporting-to-one-activegate/33049>\
**Category:** Open Q&A\
**Tags:** installation, activegate, oneagent\
**Created:** [October 20, 2021, 2:31pm UTC](https://community.dynatrace.com/t/how-to-check-how-many-agents-are-reporting-to-one-activegate/33049 "2021-10-20T14:31:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![roman\_z](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@roman\_z](https://community.dynatrace.com/u/roman_z)\
**Post date:** [October 21, 2021, 1:45pm UTC](https://community.dynatrace.com/t/how-to-check-how-many-agents-are-reporting-to-one-activegate/33049/4 "2021-10-21T13:45:37Z")

</div>

Hello Eswari,

you could use REST API&nbsp;/api/v1/oneagents

there are fields currentActiveGateId and currentActiveIds (A list of ActiveGate IDs of ActiveGates to which OneAgent is currently connected).

ActiveGateId is represented as long and hex number. You should use&nbsp;currentActiveIds (hex number)

For example:

jq -r “.hosts[] | [.hostInfo.displayName,.currentActiveGateId,(.currentActiveGateIds | join(\”,\"))] | @tsv " oneagents.json

[d2j.ttt.com](http://d2j.ttt.com) 462588410 0x1b9289fa

ci.ambit.tempest.test 1443825187 0x560f0623

You could get list of yours active gates also from REST API -&nbsp;/api/v2/activeGates

ActiveGateId is in hex format.

jq -r ".activeGates[] | [.id,.hostname] | @csv " ag.json  
“0x560f0623”,“ci.ambit.tempest.test”

But the list does not contain Dynatrace active gates for SaaS deployment

Kind regards,

Roman

---

_[View the full topic](https://community.dynatrace.com/t/how-to-check-how-many-agents-are-reporting-to-one-activegate/33049)._
