Back to top

Hootsuite Health Checks

The API that Hootsuite uses for monitoring service health.

Status

Status endpoints used to check the health of a service.

Am I Up

/status/am-i-up
GET/status/am-i-up

Checks if the service is running. This endpoint does not check any dependencies, it simply returns “OK”.

Example URI

GET https://example.com/status/am-i-up
Response  200
HideShow
Headers
Content-Type: application/text
Body
"OK"

Aggregate

/status/aggregate
GET/status/aggregate?type={type}

Checks the overall status of the service by checking the status of dependencies. By default, this endpoint checks all dependencies or can be filtered to check only internal or external dependencies.

Example URI

GET https://example.com/status/aggregate?type="internal"
URI Parameters
HideShow
type
string (optional) Example: "internal"

The type of dependencies to check (internal, external).

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "OK"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "CRIT",
  {
    "description": "aggregate check CRIT",
    "result": "CRIT",
    "details": "A detailed error message"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "WARN",
  {
    "description": "aggregate check WARN",
    "result": "WARN",
    "details": "A detailed warning message"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

About

/status/about
GET/status/about

Gets metadata about the service including it’s dependencies and their current status

Example URI

GET https://example.com/status/about
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "id": "awesome",
    "name": "Awesome Service",
    "description": "This service does awesome stuff.",
    "protocol": "http",
    "owners": [
      "Adam <adam@example.com>",
      "Denis <denis@example.com>"
    ],
    "version": "1.1.0.5a1dea1",
    "host": "app1.staging.example.com",
    "projectRepo": "https://github.com/hootsuite/awesome-service",
    "projectHome": "https://documentation.com/awesome-service",
    "logsLinks": [
        "http://logging.com/logs",
        "http://logging.com/errors"
    ],
    "statsLinks": [
        "http://graphs.com/awesome-service-dashboard",
        "http://graphs.com/awesome-service-dashboard-2"
    ],
    "dependencies": [
        {
            "name": "Mysql DB",
            "status": [
                "OK"
            ],
            "statusDuration": 0.001469342,
            "statusPath": "mysql",
            "type": "internal",
            "isTraversable": false
        },
        {
            "name": "Another Service",
            "status": [
                "OK"
            ],
            "statusDuration": 0.000605037,
            "statusPath": "another-service",
            "type": "service",
            "isTraversable": true
        }
    ],
    "customData": [
      "a-key": "a-value"
    ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "protocol": {
      "type": "string"
    },
    "owners": {
      "type": "array"
    },
    "version": {
      "type": "string"
    },
    "host": {
      "type": "string"
    },
    "projectRepo": {
      "type": "string",
      "description": "service (string, required) Link to project source control"
    },
    "projectHome": {
      "type": "string",
      "description": "service (string, required) Link to the documentation or homepage of the service"
    },
    "logsLinks": {
      "type": "array"
    },
    "statsLinks": {
      "type": "string",
      "description": "service-dashboard\", \"http://graphs.com/awesome-service-dashboard-2\"] (array[string], required)"
    },
    "dependencies": {
      "type": "array"
    },
    "customData": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "protocol",
    "owners",
    "version",
    "host",
    "logsLinks",
    "dependencies"
  ]
}

Traverse

/status/traverse
GET/status/traverse?dependencies={dependencies}&action={action}

Traverse to another node in the graph and run an “action” at that level and return the result. The default action is about.

Example URI

GET https://example.com/status/traverse?dependencies=service1,service2&action=about
URI Parameters
HideShow
dependencies
string (optional) Default: `` Example: service1,service2

A comma delimited list of services to traverse.

action
string (optional) Default: about Example: about

The action to run at the last node in the traversal.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "id": "awesome",
    "name": "Awesome Service",
    "description": "This service does awesome stuff.",
    "protocol": "http",
    "owners": [
      "Adam <adam@example.com>",
      "Denis <denis@example.com>"
    ],
    "version": "1.1.0.5a1dea1",
    "host": "s1.staging.example.com",
    "projectRepo": "https://github.com/hootsuite/awesome-service",
    "projectHome": "https://documentation.com/awesome-service",
    "logsLinks": [
        "http://logging.com/logs",
        "http://logging.com/errors"
    ],
    "statsLinks": [
        "http://graphs.com/awesome-service-dashboard",
        "http://graphs.com/awesome-service-dashboard-2"
    ],
    "dependencies": [
        {
            "name": "Mysql DB",
            "status": [
                "OK"
            ],
            "statusDuration": 0.001469342,
            "statusPath": "mysql",
            "type": "internal",
            "isTraversable": false
        },
        {
            "name": "Another Service",
            "status": [
                "OK"
            ],
            "statusDuration": 0.000605037,
            "statusPath": "another-service",
            "type": "service",
            "isTraversable": true
        }
    ],
    "customData": [
     "a-key": "a-value"
    ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "protocol": {
      "type": "string"
    },
    "owners": {
      "type": "array"
    },
    "version": {
      "type": "string"
    },
    "host": {
      "type": "string"
    },
    "projectRepo": {
      "type": "string",
      "description": "service (string, required) Link to project source control"
    },
    "projectHome": {
      "type": "string",
      "description": "service (string, required) Link to the documentation or homepage of the service"
    },
    "logsLinks": {
      "type": "array"
    },
    "statsLinks": {
      "type": "string",
      "description": "service-dashboard\", \"http://graphs.com/awesome-service-dashboard-2\"] (array[string], required)"
    },
    "dependencies": {
      "type": "array"
    },
    "customData": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "protocol",
    "owners",
    "version",
    "host",
    "logsLinks",
    "dependencies"
  ]
}

Dependency

/status/{dependency}
GET/status/{dependency}

Gets the status of a configured dependency using its statusPath. There are 3 levels of status:

OK - Everything is all good WARN - The dependency is in a sub optimal state. See details in response for more info. CRIT - The dependency has an error. See details in response for more info.

Example URI

GET https://example.com/status/"mysql-db"
URI Parameters
HideShow
dependency
string (required) Example: "mysql-db"

The statusPath of configured dependency to check the status of.

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "OK"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "CRIT",
  {
    "description": "mysql check CRIT",
    "result": "CRIT",
    "details": "Can't connect to database"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "WARN",
  {
    "description": "mysql check WARN",
    "result": "WARN",
    "details": "Running out of disk space"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Generated by aglio on 06 Mar 2017