Monitoring the status of OpenTelemetry Collectors in Splunk Enterprise
This read-only capability of OTel Collectors fleet overview allows you to monitor the health and status of your entire fleet of OpenTelemetry Collectors. It enables you to manage and troubleshoot your agents. This functionality is part of agent management and will be expanded in the future.
OTel Collectors is an open standard for collecting traces, logs, and metrics. For more information, see https://opentelemetry.io/docs/collector/.
OTel Collectors connect to the agent management using the OpenTelemetry Agent Management Protocol (OpAMP). This open standard enables centralized communication and status reporting. For more information about OpAMP, see https://opentelemetry.io/docs/specs/opamp/.
Turn on OpenTelemetry Collectors in Splunk Enterprise
You can view OTel Collectors after connecting them to Splunk Enterprise. To configure OTel Collectors, perform the following tasks:
Before you begin
To use OTel Collectors, make sure you fulfill the following requirements:
- Use Splunk Enterprise 10.0.0 or higher.
- Use the admin role.
- Use agent management on Linux on AMD64.
Configure Splunk Enterprise and turn on OpenTelemetry Collectors
To be able to use the OTel Collectors feature in agent management, you have to configure Splunk Enterprise. This topic presents an example of configuration.
The following configuration in this topic is only an example.
- Log in to Splunk Enterprise as an admin.
- Enable the feature using one of the following options:
- In Splunk Enterprise, follow these steps:
- Select the settings icon (
), and then under the Distributed Environment section, select Agent management.
The Agent management page opens.
-
On the left menu, select the OTel Collectors view.
- If you use this feature for the first time, you have to turn on OTel Collectors management. Select Enable OTel Collectors management.
- Select Restart Splunk. The restart might take some time.
- Select the settings icon (
- In the server.conf file, follow these steps:
- Use the following settings:
CODE
[data_management] otel_collector_management_enabled = true - Restart Splunk Enterprise.
- Use the following settings:
- In Splunk Enterprise, follow these steps:
- After turning on the feature, refresh the page to access the empty list of OTel Collectors.
- Copy the IP address of your Agent Management Splunk server for later use.
- Set up access tokens:
- Log in to Splunk Enterprise as an admin.
- Select the settings icon (
) and under the Users and Authentication section, select Token, and then select New Token. For more information about token creation, see Create authentication tokens in the Securing Splunk Enterprise manual.
- Create a new token, such as with the following settings:
- User = admin
- Audience = general
- Expiration = +30 d
Note: The default value for Expiration is +30 d. It means that the token expires after 30 days.Important: The user for whom you create the token must have at least thedata_management_agentrole. - Select Create.
- The token is displayed in the Token field. Copy the token and paste it into the config.yaml configuration file as described in the next section.
- Select Close.
Next step
Configure an OpenTelemetry Collector to connect to agent management
Configure an OpenTelemetry Collector to connect to agent management
Configure an OpenTelemetry Collector to connect to agent management
You can connect either the Splunk distribution of the OpenTelemetry Collector or the upstream open-source OpenTelemetry Collector Contrib to agent management. The Splunk distribution already includes the OpAMP extension. If you use the open-source Collector Contrib, the OpAMP extension is also included.
- On your machine prepare a plain text configuration file named
config.yaml. Replace the placeholders for hostname or IP address and token with the data prepared in Configure Splunk Enterprise and turn on OpenTelemetry Collectors.Use the hostname or IP address and management port of agent management you want the collector to connect with.
CODEreceivers: hostmetrics: collection_interval: 10s scrapers: memory: exporters: debug: verbosity: detailed service: pipelines: metrics: receivers: [hostmetrics] exporters: [debug] extensions: [opamp] extensions: opamp: server: http: endpoint: https://<hostname_or_IP>:<management_port>/services/tenant/agent-management/v2/opamp/otel tls: ca_file: /path/to/ca-cert.pem headers: Authorization: Bearer <your_authentication_token>Tip: If you use self-signed certificates, provide the path to your Certificate Authority (CA) file in theca_filefield. Avoid settinginsecure_skip_verify: truein production environments, as it disables certificate verification and exposes the connection to potential man-in-the-middle attacks. Useinsecure_skip_verify: trueonly in development or testing environments. - Copy your file to your target machine using the following command:
CODE
scp config.yaml <user>@<hostname_or_IP>:/home/<user> - Download the OpenTelemetry Collector to your Linux machine.
If you use the Splunk distribution of the OpenTelemetry Collector, see the Splunk OpenTelemetry Collector documentation for installation instructions. The OpAMP extension is already included.
If you use the open-source Collector Contrib, download it from the OpenTelemetry Collector GitHub repository: https://github.com/open-telemetry/opentelemetry-collector-releases/releases.
For example, you can use the following command to download otelcol-contrib_0.124.1_linux_amd64.tar.gz for AMD CPU Architecture:CODEcurl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.124.1/otelcol-contrib_0.124.1_linux_amd64.tar.gz - If you downloaded the open-source Collector Contrib archive, untar the file with the following command:
CODE
tar -xvf otelcol-contrib_0.124.1_linux_amd64.tar.gz - Run the OTel Collector using your configuration file:
CODE
./otelcol-contrib --config=config.yaml - Now, you can see the OTel Collector registered in the agent management. Select the settings icon (
), and then select Agent management.
- On the Agent management page, on the menu on the left, select the OTel Collectors view.
Next step
After you configure and connect OTel Collectors to your Splunk Enterprise instance, you can view them on Splunk Enterprise. See View OpenTelemetry Collectors in Splunk Enterprise
View OpenTelemetry Collectors in Splunk Enterprise
After configuring and connecting OTel Collectors to your Splunk Enterprise instance, you can view them in a table. You can monitor their status and check the details.
- Log in to Splunk Enterprise.
- Select the settings icon (
), and then under the Distributed Environment section, select Agent management.
The Agent management page opens.
- On the left menu, select the OTel Collectors view.
- On the Agent management - OTel Collectors page, you can see the list of OTel Collector. Information about OTel Collectors are grouped into the following table columns:
Parameters Description Agent ID The ID identifying the agent (service.instance.id) Service Name Agent name (service.name) Namespace Agent namespace (service.namespace) Version Agent application version (service.version) Host Name Agent host name (host.name) IP Address Agent IP address CPU Architecture The CPU architecture the host system is running on (host.arch) System Description Human-readable OS version information (os.description) Status The status of an agent. The possible values are OK and Offline. The status is calculated on the basis of heartbeat Check-in Shows how long ago the last heartbeat of agent was sent - To see the details, select the link in the Agent ID column. It displays a page with agent details, host detail, identifying attributes, and non-identifying attributes.
- Agent details show Capabilities that are all the functions supported by a given agent.
- Identifying attributes are attributes that identify the agent.
- Non-identifying attributes are attributes that don't necessarily identify the agent but they help describe where it runs.
Delete OpenTelemetry Collector agents in Splunk Enterprise
To keep the list of agents tidy, you can remove agents that are offline. However, if you remove an agent with the OK status, it shows up again the next time it sends a heartbeat.
- Log in to Splunk Enterprise.
- Select the settings icon (
), and then under the Distributed Environment section, select Agent management.
The Agent management page opens.
- On the left menu, select the OTel Collectors view.
- On the Agent management - OTel Collectors page, select the check box next to the OTel Collector that you want to delete and select Delete.
- Confirm the deletion.
The OTel Collector is removed from the list.