How to obtain Teamcity Agents usage in the external server

Answered

Hi Team,

I see there is an option in Teamcity UI to pull the agent statistics ({teamcity-url}/agents.html?tab=agentsStatisticsTab), where we not able to filter the data as we required. There is no option to download as image or something. So, we need to pull the statistics info and display in a different where we can drill down the data to give more understanding and easy to understand.

To achieve this, can you direct if there is a REST API or is there a way we can pull the data via sql queries. Via Sql query column mapping is a big blocker to understand. Please help here.

Thanks,

Madhusudhana

3 comments
Comment actions Permalink

The information from Agent Statistics in the web UI is also available through REST API. Please take a look at our documentation regarding this topic for the details, https://www.jetbrains.com/help/teamcity/rest/get-build-statistics.html#Get+agent+workload+statistics. If there are specific metrics that you need but are unable to find, please let me know.

0
Comment actions Permalink

Thanks Eric Borchardt for quick response. The Rest API is retrieving limited rows with the response. I would like to retrieve the entire data or at least 3 years back from now. 

Will the History table in DB schema be helpful to meet the need?

0
Comment actions Permalink

Can someone help me understanding how "usage %" is being calculated? I am not getting it, confused whether it is correct or not? I would like to give a try from the UI.

0

Please sign in to leave a comment.