-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing metrics (and incorrect agentPoolId) #53
Comments
Also
It says agentPoolID is 13. A quick scan of the agent_pool_info metric...
So 13 is "Azure Pipelines". The build number was That build ran in the Ubuntu Self Hosted pool (id - 15). Theres more occurrences of this where the pool id should have been 15 but is different values (not just 13). Update: So I tried the api requests myself and azure devops is indeed just returning bogus results. Awesome |
Delving further into the incorrect queue id problem I found this bug report:
So if I hit {
"previousAttempts": [],
"id": "44dcc42d-f50a-5805-535c-88bb857876bb",
"parentId": "5217763f-1eaf-54e7-9d2e-df231c02ed73",
"type": "Job",
"name": "Socket Hub",
"startTime": "2021-12-08T11:10:04.7166667Z",
"finishTime": "2021-12-08T11:11:31.6633333Z",
"currentOperation": null,
"percentComplete": null,
"state": "completed",
"result": "succeeded",
"resultCode": null,
"changeId": 16,
"lastModified": "0001-01-01T00:00:00",
"workerName": "pipelines-agents-68997d4746-f5gc2",
"queueId": 259,
"order": 1,
"details": null,
"errorCount": 0,
"warningCount": 0,
"url": null,
"log": {
"id": 11,
"type": "Container",
"url": "https://dev.azure.com/redacted/884a300b-e75a-4f0c-95f2-e750e4ecc5a2/_apis/build/builds/30625/logs/11"
},
"task": null,
"attempt": 1,
"identifier": "BuildAndPush.SocketHub.__default"
}, and get the values of queueId from those entries I can then hit Which contains the magic data 🧙 🍻 {
"count": 1,
"value": [
{
"id": 259,
"projectId": "884a300b-e75a-4f0c-95f2-e750e4ecc5a2",
"name": "Ubuntu Self Hosted",
"pool": {
"id": 15,
"scope": "a0d7cd10-7602-49e0-87b9-37290c2ed7f6",
"name": "Ubuntu Self Hosted",
"isHosted": false,
"poolType": "automation",
"size": 36,
"isLegacy": false,
"options": "none"
}
}
]
} and that's how (theres possible a shorter route) you get the agent pool id for the build. My builds only use one pool, I don't know if its possible to have different stages/jobs use different pools. Sorry for reporting two things in one issue 🤦♂️ |
I see my first problem is because I haven't set AZURE_DEVOPS_AGENTPOOL |
thanks for the analysis, thinking about how to solve that and avoid additional api calls 🤔 |
every job block can have an own pool (eg. separating windows and linux jobs) can you check the result for here is get (for a public testing instance):
|
@worldspawn ...i have the same issue with the missing metrics , do we need to create AZURE_DEVOPS_AGENTPOOL during container creation ? |
yes you have to set the agentpool which you want to scrape.. the next version will fetch the metrics for all agentpool (even hosted ones) so you would not have to set the env var |
I would probably prefer having a list of pools or all pools if not defined rather than single pool vs all |
you can set the next version will use all if not set. |
Hi, is it possible that you will update this? Or we will need to put all pools id? |
|
I don't seem to be getting the azure_devops_agentpool_queue_length metric.
I only see these metrics
![image](https://user-images.githubusercontent.com/819581/145186971-fbcecbbc-208e-47fa-a517-e9a4e26f00aa.png)
I can't see any errors in the exporters logs. Is there any guidance on what permissions to enable for the PAT?
The text was updated successfully, but these errors were encountered: