How to create a custom agent definition

January 21 2020

In the previous blogpost we were going through what it will take to create a custom monitoring.

In this post we will start with the first step required; to create an agent definition, a data structure for what you will monitor. The agent is defined in a JSON structure. This definition is then registered towards the AIMS API. Once registered it can be viewed under "settings -> custom agents".

Example of JSON definition:

  • "id" - a unique identifier for your agent
  • "name" - a name for your agent
  • "metadata" - the section that defines the agent structure
    •  "nodeTypes" - define the nodes for the agent. An agent can have multiple nodes
      • "name" - name of node
      • "displayName" - displayed name of the node
      • "eventTypes" - eventtypes for the node, see section below
      • "propertyTypes" -properties connected to the node, see section below
      • "statTypes" - what statistic types belong to the node, see section below
      • "statuses" - what statuses can the node have, see section below
    • "nodePropertyTypes" - a node can have multiple properties
      • "name" - name of the property
      • "displayName" - displayed name of the property
    • "nodeStatuses" - a node can have multiple statuses
      • "name" - name of status
      • "displayName" - displayed name of status
      • "type" - running / paused / stopped / undefined. 
    • "eventTypes" - what type of events are associated with the node
      • "name" - name of event
      • "displayName" - displayed name of event
    • "statTypeGroups" - statTypes can be grouped in statTypeGroups
      • "name" - name of statTypeGroup
      • "displayName" - displayed name of statTypeGroup
    • "statTypes" - time series based statistics provided by the agent. Multiple statTypes can be defined
      • "name" - name of statType
      • "displayName" - displayed name of statType
      • "group" - statTypeGroup
      • "aggregation" - avg / sum / max. The aggregation done by the agent
      • "nodeAggregation" - avg / sum / max. The aggregation done by the node
      • "unitType" - quantity / percent / milliseconds / bytes / hertz

In the next article we will cover how you register this definition as an agent template in AIMS.

Tags: Technical