The agent must be installed on a server that allows HTTP connections.

 

Prerequisites

   

  • The agent service account must be a member of the local "Administrators" group on the server you want to monitor
  • The agent service account must be granted "log on as a service"
  • The agent uses ports 80 / 443 (HTTP / HTTPS)
  • The account used while installing the agent must be the same as the service account
  • The configuration scripts must be runned under the same account as when installing the agent


You should have Powershell 6 installed (we do provide a ps5 file too if needed)


Install Agent

  1. If you have not already created an environment, please see this article before proceeding
  2. Right click the installer and select "run as administrator".
  3. Provide credentials for the agent service account
  4. Review the summary page.

Configure the Agent


  • Go to the agent install directory "C:\Program Files (x86)\AIMS\HTTP Endpoint Activity Agent"
  • There is a sample config file that can be used to configure the connection to AIMS and the endpoints you want to monitor. It is "sample.config.json"
  • Find your AIMS connection and environment information. This can be found by logging into AIMS, select the "gear" icon top right and select "Agents"
  • Copy the "Environment API address"
  • Open the "sample.config.json" config file and replace the "endpoint" and "environment" parameters with your own data copied in the previous step.


{
  "endpoint": "http://api.aimsinnovation.com/api/",
  "environment": "cca2fd0a-54aa-4062-b4b0-b81f76628b95",
  "authentication": {


  • Next you will configure the endpoints for monitoring. For authentication we currently support basic authentication
  • If you have any endpoints with basic authentication, you configure the usernames and passwords under the next "basic" section. One section per endpoint like shown in the example config file.


    "basic": [
      {
        "name": "httpbin simple password",
        "login": "simple",
        "password": "password"
      },
      {
        "name": "httpbin long password",
        "login": "superlong",
        "password": "superlongcrypticpassword1"
      }
    ]



  • Next up is the "systems" section. This is where you define how your endpoints and select how the endpoints are presented in AIMS.
  • First up, you group your selected endpoints with the "name" tag as shown in the example config. In the example we present two groups, each with two endpoints. First group is a selection of endpoints without authentication, second group of endpoints use basic authentication. 
  • Second "name" section in the example config shows how to structure your endpoints that require basic authentication. Note how each endpoint specified references the previous "basic" section containing login / password.


"systems": [
    {
      "name": "simple request",
      "endpoints": [
        {
          "endpoint": "http://httpbin.org/get?plain"
        },
        {
          "endpoint": "https://httpbin.org/get?https"
        }
      ]
    },
    {
      "name": "authorization",
      "endpoints": [
        {
          "endpoint": "https://httpbin.org/basic-auth/simple/password",
          "authentication": {
            "$ref": "#/authentication/basic/0"
          }
        },
        {
          "endpoint": "http://httpbin.org/basic-auth/superlong/superlongcrypticpassword1",
          "authentication": {
            "$ref": "#/authentication/basic/1"
          }
        }
      ]


Final Setup and Restart Agent


  1. Open Powershell
  2. Go to the install directory, typically "C:\Program Files (x86)\AIMS\HTTP Endpoint Activity Agent". 
  3. Run the "configure.ps1" (v6) or "configure.ps5.ps1" (v5) with the following parameters in this order: $Configuration $Username $Password (the name of the configuration file you have just edited and your AIMS username and password.)
  4. Example: > configure.ps1 sample.config.json testuser testpwd


The script will configure your agent with the proper credentials and endpoints, and restart the HTTP agent service.