Monitoring
  • Dark
    Light
  • PDF

Monitoring

  • Dark
    Light
  • PDF

To maximize availability and ensure consistent performance, Itential recommends the following to monitor Itential Automation Platform (IAP). The examples provided here are designed to configure the application for monitoring and to receive actionable alerts.

Basic Monitoring

IAP has a convenience route /status that requires no login that can be used for basic monitoring. This route is appropriate to use by a load balancer to determine if an individual node is healthy. IAP will return a 200 when healthy. Any other response or lack of response should be interpreted as unhealthy. It is recommended to set the timeout for this request to 1 second.

Request

GET /status HTTP/1.1
Host: *some-iap-host*:3000
Accept: /

Healthy Response

The following example shows a healthy response (i.e., Redis is healthy).

{
  "statusCode": 200,
  "success": true,
  "host": "ip-10-0-7-211.ec2.internal",
  "serverId": "0a:7c:84:cd:c1:91:3000",
  "services": [
    {
      "service": "redis",
      "status": "PONG",
      "available": true
    },
    {
      "service": "mongo",
      "status": 1,
      "available": true
    },
    {
      "service": "rabbitmq",
      "status": "available",
      "available": true
    }
  ],
  "time": "4:08:49 PM UTC"
}

Unhealthy Response

The following example shows an unhealthy response (i.e., Redis is not healthy).

{
  "statusCode": 500,
  "success": false,
  "host": "ip-10-0-7-211.ec2.internal",
  "serverId": "0a:7c:84:cd:c1:91:3000",
  "services": [
    {
      "service": "redis",
      "status": {},
      "available": false
    },
    {
      "service": "mongo",
      "status": 1,
      "available": true
    },
    {
      "service": "rabbitmq",
      "status": "available",
      "available": true
    }
  ],
  "time": "4:03:14 PM UTC"
}

Application and Adapter Monitoring

Itential also recommends that you monitor individual applications and adapters to determine if they are healthy. IAP has two routes to monitor apps and adapters, with each requiring a valid session token.

Application Monitoring

For each application in the results array careful attention should be given to the state field. If it does not say RUNNING then the application should be considered unhealthy. The uptime, memoryUsage, and cpuUsage fields can be tracked to monitor how consumption of these resources changes for better or worse over time.

Request

GET /health/applications?token=*some-iap-token* HTTP/1.1
Host: *some-iap-host*:3000
Accept: /

Response

{
  "results": [
    {
      "id": "AdminEssentials",
      "package_id": "@itential/app-admin_essentials",
      "version": "3.5.64-2021.2.50.0",
      "type": "Application",
      "description": "Itential Automation Platform's administration suite.",
      "state": "RUNNING",
      "connection": null,
      "uptime": 320.914691654,
      "memoryUsage": {
        "rss": 52662272,
        "heapTotal": 29638656,
        "heapUsed": 27756488,
        "external": 38208460,
        "arrayBuffers": 36697945
      },
      "cpuUsage": {
        "user": 1284858,
        "system": 167948
      },
      "pid": 15283,
      "logger": {
        "console": "info",
        "file": "info",
        "syslog": "warning"
      },
      "routePrefix": "admin",
      "prevUptime": 206.380886528
    },
    ...more applications...
  ]
}

Adapter Monitoring

For each adapter in the results array careful attention should be given to the state field. If it does not say RUNNING then the adapter should be considered unhealthy. Adapters have an additional connection.state field that indicates if the adapter is currently passing its health check to the target system. Anything other than ONLINE should be considered unhealthy. The uptime, memoryUsage, and cpuUsage fields can be tracked to monitor how consumption of these resources changes for better or worse over time.

Request

GET /health/adapters?token=*some-iap-token* HTTP/1.1
Host: *some-iap-host*:3000
Accept: /

Response

{
  "results": [
    {
      "id": "local_aaa",
      "package_id": "@itential/adapter-local_aaa",
      "version": "4.3.1-2021.2.3.0",
      "type": "Adapter",
      "description": "Simple AAA against local persistence store.",
      "state": "RUNNING",
      "connection": {
        "state": "ONLINE"
      },
      "uptime": 804.227121682,
      "memoryUsage": {
        "rss": 62124032,
        "heapTotal": 36909056,
        "heapUsed": 34986384,
        "external": 56421712,
        "arrayBuffers": 54911197
      },
      "cpuUsage": {
        "user": 1989815,
        "system": 231054
      },
      "pid": 15568,
      "logger": {
        "console": "info",
        "file": "info",
        "syslog": "warning"
      },
      "routePrefix": "local_aaa",
      "prevUptime": 426.752105274
    }
    ...more adapters...
  ]
}

SNMP Traps

IAP also produces SNMP Traps that can be leveraged to perform alerting when certain events occur. More information is available in the SNMP Notification Types article.


What's Next