Run Collection Agent as a standalone Java process

This page describes how to run the Collection Agent as an unmanaged standalone Java process that you start and stop yourself. The Netprobe does not supervise the process, so you can run the Collection Agent on a different host from the Netprobe or treat it like any other Java service.

Use this path when the Netprobe and Collection Agent run on different hosts, or when you manage the Java process yourself. If they run on the same host, see Run Collection Agent via Netprobe instead.

Run the Collection Agent Copied

To run the Collection Agent as a standalone Java process, follow these steps:

  1. Download the Collection Agent binary (collection-agent-<version>-exec.jar) from the ITRS Resources page.
  2. Create a YAML configuration file for the Collection Agent (collection-agent.yml). Refer to Sample configuration for an example minimum configuration required for the Collection Agent to work. For the full YAML reference and section descriptions, see the Collection Agent configuration reference.
  3. In the Gateway Setup Editor, open Dynamic entities > Collection agent parameters > New Collection agent parameters. Choose Unmanaged as the Collection Agent type and set Reporter port to the TCP reporter port from your YAML. When that is in place, datapoints from the TCP reporter can flow into Geneos as expected.
  4. Download any additional plugins from the ITRS Resources page and install them under pluginDirectory.

Starting the Collection Agent via command line Copied

Run the following command to start the Collection Agent. Pass the path to your YAML as the last argument.

java -jar collection-agent-<version>-exec.jar /path/to/collection-agent.yml

Note

To validate configuration and exit without running the pipelines, add -DtestConfig before -jar. An exit code 0 means the configuration loaded successfully.

Stop the standalone Collection Agent by stopping that Java process. For example, you can interrupt the terminal or stop the service wrapper you use.

Sample configuration Copied

At minimum, you must set pluginDirectory, define collectors, define at least one reporters entry, and wire workflow pipelines to the reporter name.

pluginDirectory: ${env:CA_PLUGIN_DIR}

monitoring:
  healthProbe:
    listenPort: ${env:HEALTH_CHECK_PORT}
  selfMetrics:
    dimensions:
      app_name: collection-agent

reporters:
  - type: tcp
    name: tcp
    hostname: localhost
    port: ${env:TCP_REPORTER_PORT}

collectors:
  - name: statsd
    type: plugin
    className: StatsdServer

workflow:
  storeDirectory: .
  metrics:
    reporter: tcp
  events:
    reporter: tcp

Note

For a secure TCP connection, add tlsConfig under the TCP reporter in your YAML and ensure the Netprobe is configured for secure Collection Agent access. For more information, see Collection Agent configuration reference.

Next steps Copied

Now that you have run the Collection Agent, create Dynamic Entities and add it to the Netprobe.

["Geneos"] ["Geneos > Netprobe"] ["User Guide"]

Was this topic helpful?