Skip to content

API that helps to return the status of self-hosted azure devops agents

License

Notifications You must be signed in to change notification settings

GeorgeLBS1/azdv-agent-pool-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AZDV Agent Pool Monitoring Agent-Status

It is an API that helps to return the status of self-hosted azure devops agents, in order to know their health. It is designed with the purpose of integrating with some other application (PowerBI, Grafana, Microsoft Teams integrations through PowerAutomate) to obtain data on the status of the agents every certain amount of time.

Features

  • Get All Agents from Agent Pools Status

Installation

Install project with npm

  npm install

Run Locally

Clone the project

  git clone https://github.com/GeorgeLBS1/azdv-agent-pool-monitoring.git

Go to the project directory

  cd azdv-agent-pool-monitoring

Install dependencies

  npm install

Run Serverless Offline

  npm run dev

Deployment

To deploy this project run

  npm run deploy

Or run

  serverless deploy --profile AWS_ACCOUNT

API Reference

Obtain agentsStatus

  Post /dev/agentsStatus
Parameter Type Description
organization string Required. Your Azure DevOps Organization
pat string Required. Azure DevOps PAT

Response Schema

{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "array",
  "items": {
    "$ref": "#/definitions/AgentPoolDetail"
  },
  "definitions": {
    "AgentPoolDetail": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "pool": {
          "$ref": "#/definitions/Pool"
        }
      },
      "required": ["pool"],
      "title": "AgentPoolDetail"
    },
    "Pool": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "link": {
          "type": "string",
          "format": "uri",
          "qt-uri-protocols": ["https"]
        },
        "agents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Agent"
          }
        }
      },
      "required": ["agents", "id", "link", "name"],
      "title": "Pool"
    },
    "Agent": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/Status"
        },
        "statusChangedOn": {
          "type": "string",
          "format": "date-time"
        },
        "link": {
          "type": "string",
          "format": "uri",
          "qt-uri-protocols": ["https"]
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "required": ["enabled", "id", "link", "name", "status"],
      "title": "Agent"
    },
    "Status": {
      "type": "string",
      "enum": ["offline", "online"],
      "title": "Status"
    }
  }
}

About

API that helps to return the status of self-hosted azure devops agents

Topics

Resources

License

Stars

Watchers

Forks