Collection Agent setup
Overview Copied
This guide outlines the step-by-step procedures you need to start running the Collection Agent in a standard environment.
Caution
Make sure to read Upgrading Collection Agent, which outlines the breaking changes that may have an impact on your upgrade, before you upgrade to the latest version of Geneos and Collection Agent.
For information on running the Collection Agent in an orchestrated environment, see Data collection in an orchestrated environment.
Note
Beginning Geneos 5.1, the Collection Agent is included in the Netprobe binaries for Windows and generic Linux platforms.
Prerequisites Copied
System requirements Copied
The following requirements must be met on the machine where the Netprobe and Collection Agent are installed:
- Linux operating system (CentOS, RHEL, or SUSE), or
- Windows operating system
Java requirements Copied
-
Java 17 or higher.
-
A minimum Java heap size of 512MB is recommended for Collection Agent.
If the agent is performing garbage collection too frequently as the volume increases, a larger heap size should be allocated.
-
Once you have Java installed, configure the environment variables required by the Netprobe so that it can locate the required resource files. For guidance, see Configure the Java environment.
Caution
Java installation and environment configuration is a common source of errors for users setting up Java-based components and plug-ins. You should read Configure the Java environment to help you understand your Java installation.
Geneos components requirements Copied
- Geneos Netprobe version 5.1.0 or higher. Please read Upgrading the Collection Agent for information on how to properly upgrade to the latest version of Collection Agent.
- Ensure that your Gateway and Netprobe are running.
Caution
If you are using a Gateway version 5.2, then any Netprobe running in normal or floating mode must also be version 5.2. Otherwise, the Collection Agent will not start.
Setup and configuration Copied
To set up and configure your Collection Agent, do the following.
-
Configure your Collection Agent depending on how you want to run it. You can run the Collection Agent in two ways:
Regardless of how you run your Collection Agent, it will always run as a Java process.
Run Collection Agent via Netprobe Copied
Caution
Collection Agent and its plugins is no longer packaged with the Netprobe in Geneos 5.14.7 and the subsequent 5.x versions. If you want to run Collection Agent via Netprobe, please upgrade to the current 6.x version of Geneos.
You can run the Collection Agent with Netprobes running in the normal, floating, or self-announcing modes on the same host.
To run the Netprobe and the Collection Agent on different hosts, you must Run Collection Agent as a stand-alone Java process.
To run the Collection Agent via Netprobe, follow these steps:
-
In Gateway Setup Editor, click Dynamic entities > Collection agent parameters, and then click New Collection agent parameters.
-
Select
Managed
in the Collection Agent dropdown list. -
Choose your preferred YAML type in the Yaml dropdown list and configure your Collection Agent parameters.
YAML type Configure your Collection Agent in Bundled YAML the
collection_agent/collection-agent.yml
packaged with the Netprobe binary.Custom YAML the specified YAML file that can have any name. The file can be in any folder but if you are using a relative path, then it should be relative to the working directory. Managed YAML the Gateway Setup Editor. For more information, see Managed Collection Agent in Dynamic Entities. Note
If you are starting the Collection Agent using the Netprobe, all the ports configured in the Gateway Setup Editor will automatically apply to the running Collection Agent. -
Configure your plugins.
YAML type Configure your plugins by Bundled YAML adding the parameters of the desired plugins in the
collection_agent/collection-agent.yml
packaged with the Netprobe binary.Custom YAML adding the parameters of the desired plugins in the specified YAML file in Step 3.
Managed YAML adding the parameters in the Dynamic Entities > Collectors section in the Gateway Setup Editor. For more configuration information, see Collectors in Dynamic Entities. Note
If you need to set up a new plugin that is not yet included in the package, you can download it from the ITRS Downlaods and add it to thecollection_agent
directory.
Self-Announcing Netprobe Copied
For Self-Announcing Netprobes, you can start the Collection Agent by adding the following configuration in the selfAnnounce
settings in the Netprobe setup file:
<dynamicEntities>
<collectionAgentParameters>CollectionAgentParams</collectionAgentParameters>
<mappingType>DynamicEntitiesMapping</mappingType>
</dynamicEntities>
For more information, see Self-announce settings in Netprobe setup.
Note
You still have to Create Dynamic Entities and make sure of the following:
- The value inside the
collectionAgentParameters
tag in the XML above is the name of your Collection agent parameters in Gateway Setup Editor.- The value inside the
mappingType
tag in the XML above is the name of your Mapping type in Gateway Setup Editor.
Run Collection Agent as a stand-alone Java process Copied
Running the Collection Agent as a stand-alone Java process allows you to run the Netprobe and the Collection Agent on different hosts.
If you wish to run the Netprobe and the Collection Agent on the same host, you must Run Collection Agent via Netprobe.
To run Collection Agent as a stand-alone Java process, follow these steps:
-
Download the Collection Agent jar file,
collection-agent-<version>-exec.jar
, from the ITRS Downloads. -
Create a configuration file in YAML format, for example,
collection-agent.yml
. Ensure the following:- The TCP reporter fields are configured:
hostname:
- host where the Netprobe is running.port:
- a unique port number.
- The environment variables in the
collection-agent.yml
are defined on your host.
plugin-directory: ${env:CA_PLUGIN_DIR} monitoring: health-check: listen-port: ${env:HEALTH_CHECK_PORT} metrics: dimensions: app_name: collection-agent reporters: - type: tcp name: tcp hostname: localhost port: ${env:TCP_REPORTER_PORT} collectors: - name: statsd type: plugin class-name: StatsdServer workflow: store-directory: . metrics: reporter: tcp events: reporter: tcp
For more information on configuring the Collection Agent, see Collection Agent configuration reference.
- The TCP reporter fields are configured:
-
In Gateway Setup Editor, click Dynamic entities > Collection agent parameters, and then click New Collection agent parameters.
-
Select
Unmanaged
in the Collection Agent dropdown list. -
Input the
port
value from your YAML file in the Reporter port field.
-
If you need to set up a new plugin, download it from the ITRS Downloads and put it in the same directory as
collection-agent-<version>-exec.jar
. -
Run the Collection Agent using the following command:
java -jar collection-agent-<version>-exec.jar collection-agent.yml
-
To stop the Collection Agent, stop the Java process you started in Step 7.
Note
The only way to start or to stop the Collection Agent as a stand-alone Java process is to run the Java command in Step 8 and to stop the Java process in the terminal, respectively.
Create Dynamic Entities Copied
Netprobes receive datapoints from Collection Agents. Each datapoint can have a different set of dimensions, attributes, and properties. You should create mappings to construct a Geneos hierarchy from datapoints. This Geneos hierarchy determines how data is displayed in your Active Console. You should also create a mapping type, which allows you to easily deploy the same configuration on multiple probes.
- Open Gateway Setup Editor.
- Click Dynamic entities > Mapping, and then click New Mapping.
- Enter a mapping name in the Name field.
- In Options, choose custom or builtin. For more information, see Dynamic entities > Mapping > Options in Dynamic Entities.
Note
A built-in Collection Agent V3 mapping is packaged with the Netprobe, which automatically sets up the default mappings needed to display the Collection Agent self-monitoring metrics.
- Click Dynamic entities > Mapping types, and then click New Mapping type.
- If you configured a managed Collection Agent with a managed YAML type in the previous steps, then in the Collectors field, click Add new to add the name of the collectors you created in Run Collection Agent via Netprobe.
- In the Mappings field, click Add new to add the name of the mapping created in Step 4.
- To monitor the logs collected by the Collection Agent plugin, you can add an FKM plugin sampler in the Samplers field. The FKM plugin consumes these logs as streams. To configure your FKM plugin to monitor these streams, see files > file > source > stream in configuration.
Add Dynamic Entities in your Netprobe Copied
- Open Gateway Setup Editor.
- In Probes, select your Netprobe and go to the Dynamic Entities tab.
- Choose a mapping type in the Mapping type dropdown list.
- Choose a collection agent parameter in the Collection agent parameters dropdown list.
Note
If mappings are defined in both the Mapping type and in the Collector, then the Netprobe will apply the mappings defined in the Mapping type first then the mappings defined in the Collectors.
Collection Agent self-monitoring Metrics Copied
If you started the Collection Agent with the built-in Collection Agent V3 mapping, then the Collection Agent self-monitoring metrics are displayed in your Active Console.
Dynamic Entities Health Copied
The plugin monitors the performance of and communication. It tracks the state of all metrics received by a from the , and all associated with a .
For guidance on how to set up the Dynamic Entities Health sampler, see Dynamic Entities Health.
Collection Agent log file Copied
The Collection Agent uses a separate log file from the Netprobe. The log settings for Collection Agent use Logback and are stored in logback.xml
.
For example, you want to set the Logback with the following limitations:
- Each file should not exceed 100MB.
- Should only store data for 60 days.
- Should not exceed 20GB
- Rollover daily
You can use the following configuration:
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${COLLECTION_AGENT_DIR:-.}/collection-agent.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- rollover daily -->
<fileNamePattern>mylog-%d{yyyy-MM-dd}.%i.txt</fileNamePattern>
<!-- each file should be at most 100MB, keep 60 days worth of history, but at most 20GB -->
<maxFileSize>100MB</maxFileSize>
<maxHistory>60</maxHistory>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
For more information on the other available options for modifying the logger settings, see Logback.
By default, the Collection Agent log file is stored in the collection-agent.log
of the working directory. If you are running a managed Collection Agent and you configured the Log directory parameter in GSE, then the collection-agent.log
will be in that specified location.
Connection and lifecycle Copied
When run with the Netprobe, Collection Agent runs as a Java process alongside the Netprobe process.
Common failure modes Copied
The Collection Agent will not start in the following scenarios:
JAVA_HOME
is not set in the Netprobe’s environment. For more information, see Configure the Java environment.- Collection Agent resource files are missing, or are not the same version packaged in the
collection_agent
directory:collection-agent-<version>-exec.jar
collection-agent.yml
- The following Collection Agent ports are not available:
- Health port
- Reporter port
- StatsD UDP port is not available
Note
The StatsD plugin uses the default which is specified in thecollection-agent.yml
. If two Netprobes are running with one Collection Agent, then theAddress bind already in use.
error message is displayed in the Collection Agent log file.
Netprobe connection Copied
The following describes the behaviour of the Netprobe connection depending on the state of the Collection Agent:
- Netprobe restarts the managed Collection Agent if the latter goes down, or cannot be detected after having been detected before.
- Netprobe will attempt to restart an unreachable Collection Agent three times. If on the third time, the Netprobe still cannot detect the Collection Agent, then it no longer attempts to restart the Collection Agent.
- If the Netprobe restarts, the managed Collection Agent is also restarted.
Note
A Collection Agent started independently of the Netprobe is not managed by the Netprobe.
Health checks Copied
The Netprobe periodically pings the managed Collection Agent through the defined health check port.
The health checks are governed by the following variables:
Name | Description |
---|---|
CA_HEALTHCHECK_INTERVAL |
Maximum number of attempts that the Netprobe makes to contact a managed Collection Agent.
Default value: |
CA_MAX_HEALTHCHECK_ATTEMPTS |
Maximum number of attempts that the Netprobe makes to contact a managed Collection Agent.
Default value: |
CA_HEALTHCHECK_TIMEOUT |
Time in seconds that the Netprobe waits for a response from the Collection Agent during a health check.
Default value: |
CA_MAX_RESTARTS |
Maximum number of attempts that the makes to restart an unresponsive managed .
If the Netprobe fails to communicate with the managed Collection Agent after the maximum number of attempts, then the Netprobe stops monitoring the managed Collection Agent. Default value: |