How to configure Self Announcing NetProbe with Collection Agent
Users should refer to the How to set up Collection Agent and How to set up Self Announcing Netprobes on the pre-requisites to set these components up.
Note it is recommended that you run GA6.X version of netprobe alongside 3.x collection agent version.
One can use an example netprobe.setup.xml configuration for the self announcing netprobe.
-
Use the following as template guidance
<?xml version="1.0" encoding="ISO-8859-1"?> <netprobe compatibility="1"> <selfAnnounce> <enabled>true</enabled> <retryInterval>60</retryInterval> <requireReverseConnection>true</requireReverseConnection> <probeName>JMXCASelf</probeName> <managedEntities> <managedEntity> <name>Stats Monitoring</name> <attributes> <attribute name="CITY">London</attribute> <attribute name="ENVIRONMENT">production</attribute> <attribute name="GATEWAY">MARKETDATA</attribute> <attribute name="APP">InfraServices</attribute> <attribute name="TEAM">MarketData</attribute> </attributes> <types> <type>Generic</type> </types> <variables> <var name="EMAILRECIPIENTS"> <string>MarketData@abc.net</string> </var> </variables> </managedEntity> </managedEntities> <dynamicEntities> <mappingType>Java</mappingType> <collectionAgentParameters>MineBundled</collectionAgentParameters> </dynamicEntities> <gateways> <gateway> <hostname>mygatewayhostname</hostname> <port>11000</port> <insecure>true</insecure> </gateway> </gateways> </selfAnnounce> </netprobe> -
We are doing bundledYAML, with
collection_agent/collection-agent.ymlpackaged with the Netprobe binary .Use the following collection-agent.yml - this test use case uses the statsd pluginplugin-directory: ${env:CA_PLUGIN_DIR} monitoring: reporting-interval: 10000 health-probe: enabled: true listen-port: ${env:HEALTH_CHECK_PORT} self-metrics: enabled: false dimensions: app: collection-agent reporters: - type: tcp name: tcp hostname: localhost port: ${env:TCP_REPORTER_PORT} collectors: - name: statsd type: plugin class-name: StatsdServer transport-protocol: tcp listen-port: 30095 workflow: store-directory: . attributes: reporter: tcp metrics: reporter: tcp events: reporter: tcp logs: reporter: tcp traces: enabled: false -
Ensure Mapping Type is defined across your gateways
-
Ensure your Mapping is defined across your gateways
-
Ensure you have defined Collection Agent Parameters section across your gateways
-
In this test case we are using statsd plugin - Ensure this is defined across your gateways.
-
Also ensure a type called Generic is present across the gateways
-
Run a test program to expose data to the collection agent.
Create an Example script - this uses statsd-client-2.1.1.jar, TickTock.jar, TickTock.class - these files needed to be present for the below script to operate
#!/bin/bash export STATSD\_SERVER=yournetprobehost export STATSD\_PORT=30095 /disk2/Utilities/zulu11.54.23-ca-jdk11.0.14-linux\_x64/bin/java -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=20102 -Dcom.sun.management.jmxremote.ssl=false -javaagent:/disk2/Utilities/statsd-client-2.1.1.jar=protocol=tcp,dimension=app\_name:jmx\_app2,dimension=region:EMEA,dimension=jmx\_port:20102 -jar TickTock.jar >> TickTockCol.log & -
Start your netprobe/collection agent - A dynamic entity should be created.
Sample dynamic entities xml and statsd jar and application files included.