Otel Collector Issues
Troubleshoot Otel Collector startup, data-drop, and disk-utilization issues.
Below are the troubleshooting steps for the Otel collector issues:
- Otel Collector Startup Issue Due to Port Conflict
- How to Enable ZIPKIN on OTEL Collector
- Otel Collector Droppage Check
- Checking Otel Collector Data Drop
- OTEL Collector Issue (Non-PT 6 nodes and PT 8 Nodes)
- Transaction (Trace) Data Not Appearing in HEAL — spans accepted by the Collector but never stored
For reference:
The following section contains basic Linux commands: Basic Commands
Otel Collector Startup Issue Due to Port Conflict#
Issue: The Otel collector fails to start due to a port conflict on port 14250, which is currently being used by another application.
Error:
Error: cannot start pipeline: failed to bind to gRPC address
["0.0.0.0:14250" "tcp"]: listen tcp 0.0.0.0:14250: bind: address
already in use
Root Cause: The port conflict arises because port 14250 is being used by Jaeger as its default port for the collector's GRPC server.
Solution:
To resolve the port conflict, the default port used by Jaeger's collector GRPC server needs to be changed. This can be done by modifying the Jaeger.nomad file to include a new argument that specifies a different port number.
Here are the steps to make the change:
1. Open the Jaeger.nomad file.
2. Add the following argument to the configuration to specify a new port for the collector's GRPC server:
--collector.grpc-server.host-port=<new_port_number>
Replace <new_port_number> with an available port that does not conflict with other services.
By applying these changes, Jaeger will use a new port for its collector's GRPC server, allowing the Otel collector to start successfully on port 14250 without conflicts.
How to Enable ZIPKIN on OTEL Collector#
Follow the below steps to enable ZIPKIN on the OTEL Collector.
1. Navigate to the below file:
config-probsampling.yaml
and update the start command.
2. Modify the config-probsampling.yaml File:
Edit the configuration file to include the ZIPKIN receiver and necessary settings.
vi config-probsampling.yaml
Expected Output:
extensions:
zpages:
endpoint: ":55679"
memory_ballast:
size_mib: 1000
health_check:
receivers:
otlp:
protocols:
grpc:
http:
cors:
allowed_origins:
"*"
jaeger:
protocols:
grpc:
zipkin:
endpoint: 0.0.0.0:9411
processors:
memory_limiter:
check_interval: 2s
#limit_mib: 3500
spike_limit_mib: 700
probabilistic_sampler:
sampling_percentage: 10
batch:
send_batch_size: 8192
timeout: 5s
exporters:
logging:
verbosity: normal
elasticsearch/trace:
endpoints:
[https://192.0.2.125:9211,https://192.0.2.126:9211,https://192.0.2.127
73:9211]
user: admin
password: <password>
tls:
#ca_file: /opt/heal-opentelemetry-collector/root-ca.pem
insecure_skip_verify: true
num_workers: 4
traces_index_date_layout: day
index_prefix:
service:
extensions: [zpages, memory_ballast, health_check]
telemetry:
logs:
level: "info"
metrics:
level: normal
pipelines:
traces:
receivers: [otlp, jaeger, zipkin]
processors: [memory_limiter, probabilistic_sampler, batch]
exporters: [logging, elasticsearch/trace]
2. Start Command: Use the following command to start the OTEL Collector:
podman run --network="host" --name="heal-opentelemetry-collector" -d
\
-v /heal/Appnomic_HEAL/OTEL/logs:/tmp/logs \
-v /heal/Appnomic_HEAL/OTEL/run-config/config-
probsampling.yaml:/opt/heal-opentelemetry-collector/run-
config/config.yaml \
registry.example:8091/heal-opentelemetry-collector:latest
Note: The --rm option ensures the container is automatically removed after it stops. However, logs will not be viewable if --rm is used. If this is the first time installing the OTEL collector, do not use the - -rm option.
Otel Collector Droppage Check#
To check if there is any drop in JIM data at the otel-collector level, follow these steps:
1. Execute the following API call from where the otel collector is running:
curl -X GET http://localhost:8888/metrics
Use the port specified in the otel-config file for metrics.
2. If running an otel load balancer, use the port of the otel load balancer. If the otel collector is running in standalone mode, use the otel collector port.
3. In the output, check the values of the following metrics:
otelcol_receiver_refused_spansotelcol_exporter_send_failed_spans
These values should be 0. If they are not, it indicates a JIM data drop.
If there are data drops, check the sizing for both otel and OpenSearch JIM nodes. Ensure the JIM node port is open from the otel collector host to the DB host.
Checking Otel Collector Data Drop#
To determine how many spans the otel collector drops when sending data to OpenSearch, check the following KPIs in the metrics output:
1. Execute the below command to fetch the metrics data:
curl -X GET http://localhost:8888/metrics
The above command will output the metrics based on the port specified in the Otel configuration file.
2. Check Metrics for Data drops:
If the exporter is an otel load balancer, look for:
otelcol_exporter_send_failed_spans{exporter="loadbalancing",...}
<value>
For Example:
otelcol_exporter_send_failed_spans{exporter="loadbalancing",service_
instance_id="e813823f-2732-4f5f-8945-
8c76a2c049b9",service_name="heal-otelcol",service_version="1.0.0"}
4.8992045e+07
If the exporter is an Elasticsearch/trace, look for:
otelcol_exporter_send_failed_spans{exporter="elasticsearch/trace",...
} <value>
Here, <value> indicates the number of spans dropped. This number may not be 100% accurate due to retry mechanisms.
For Example:
otelcol_exporter_send_failed_spans{exporter="elasticsearch/trace",se
rvice_instance_id="e813823f-2732-4f5f-8945-
8c76a2c049b9",service_name="heal-otelcol",service_version="1.0.0"}
4.8992045e+07
3. To calculate dropped spans, use the below formula:
(Total spans receiver accepted + Total spans receiver rejected) -
(Total spans successfully sent to the destination) = Dropped spans
count
4. To find how many spans the otel load balancer sent successfully, look for:
otelcol_exporter_sent_spans{exporter="loadbalancing",...} <value>
For Example:
otelcol_exporter_sent_spans{exporter="loadbalancing",service_instanc
e_id="e813823f-2732-4f5f-8945-8c76a2c049b9",service_name="heal-
otelcol",service_version="1.0.0"} 1.0325517098e+10
5. To find how many spans the otel collector successfully sent to OpenSearch, look for:
otelcol_exporter_sent_spans{exporter="elasticsearch/trace",...}
<value>
For Example:
otelcol_exporter_sent_spans{exporter="elasticsearch/trace",service_i
nstance_id="e813823f-2732-4f5f-8945-
8c76a2c049b9",service_name="heal-otelcol",service_version="1.0.0"}
1.0325517098e+10
6. Spans accepted by Otel receiver:
For OTLP receiver
otelcol_receiver_accepted_spans{receiver="otlp", ...} <value>
For Example:
otelcol_receiver_accepted_spans{receiver="otlp",service_instance_id=
"e813823f-2732-4f5f-8945-8c76a2c049b9",service_name="heal-
otelcol",service_version="1.0.0",transport="grpc"} 1.1412260969e+10
For Jaeger receiver:
otelcol_receiver_accepted_spans{receiver="jaeger", ...} <value>
For Example:
otelcol_receiver_accepted_spans{receiver="jaeger",service_instance_id
="e813823f-2732-4f5f-8945-8c76a2c049b9",service_name="heal-
otelcol",service_version="1.0.0",transport="grpc"} 1.1412260969e+10
7. Spans rejected by Otel receiver
For OTLP receiver
otelcol_receiver_refused_spans{receiver="otlp", ...} <value>
For Example:
otelcol_receiver_refused_spans{receiver="otlp",service_instance_id="
e813823f-2732-4f5f-8945-8c76a2c049b9",service_name="heal-
otelcol",service_version="1.0.0",transport="grpc"} 2.971339e+06
For Jaeger receiver:
otelcol_receiver_refused_spans{receiver="jaeger", ...} <value>
For Example:
otelcol_receiver_refused_spans{receiver="jaeger",service_instance_id=
"e813823f-2732-4f5f-8945-8c76a2c049b9",service_name="heal-
otelcol",service_version="1.0.0",transport="grpc"} 2.971339e+06
8. Different metrics files and configurable ports are used for the Otel load balancer and standalone Otel collectors (Default is 8888).
Load balancer-related KPIs will be found in the load balancer's metrics output, and collector-related metrics will be found in the collector's metrics file.
Execute the below command to retrieve the metrics data:
curl -X GET http://localhost:8888/metrics
OTEL Collector Issue (Non-PT 6 nodes and PT 8 Nodes)#
Data from the OTEL collector was not visible in Grafana, despite indices being created for the current date.
RCA:
1. Verify the following status by executing the below command,
a. Cluster Health:
curl -ku healadmin:<password> -XGET
"https://<opensearch_ip>:9211/_cluster/health?pretty"
Expected Output :
{
"cluster_name" : "Heal-OpenSearch-cluster",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 15,
"number_of_data_nodes" : 9,
"discovered_master" : true,
"active_primary_shards" : 310,
"active_shards" : 589,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 2,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 99.66159052453469
}
b. Disk Utilization:
df -h
Expected Output :
Filesystem Size Used Avail Use% Mounted on
devtmpfs 110G 0 110G 0% /dev
tmpfs 110G 8.0K 110G 1% /dev/shm
tmpfs 110G 2.2G 108G 2% /run
tmpfs 110G 0 110G 0% /sys/fs/cgroup
/dev/mapper/rhel-root 44G 29G 15G 66% /
/dev/mapper/EDB_VG-APP_VOL 100G 747M 100G 1% /app
/dev/sda2 1014M 418M 597M 42% /boot
/dev/sda1 599M 5.9M 594M 1% /boot/efi
/dev/mapper/apm_vg01-apm_lv01 1.9T 332G 1.6T 18% /HEAL
tmpfs 1.0M 0 1.0M 0% /HEAL/Appnomic/nomad/alloc/4b950c6e-1571-9a1a-
7884-0c98e9d72077/opensearch-master-node1/secrets
tmpfs 1.0M 0 1.0M 0% /HEAL/Appnomic/nomad/alloc/4b950c6e-1571-9a1a-
7884-0c98e9d72077/opensearch-master-node1/private
tmpfs 1.0M 0 1.0M 0% /HEAL/Appnomic/nomad/alloc/0cd3bf11-ab4c-0f4f-
1caf-94d818a50d46/opensearch-cordinator-node1/secrets
tmpfs 1.0M 0 1.0M 0% /HEAL/Appnomic/nomad/alloc/0cd3bf11-ab4c-0f4f-
1caf-94d818a50d46/opensearch-cordinator-node1/private
tmpfs 1.0M 0 1.0M 0% /HEAL/Appnomic/nomad/alloc/154b7d70-e1be-b48b-
9130-41961f70339c/opensearch-jim-node1/secrets
Observed that in a 6-node setup, the Heal partition reached 90%, which caused automatic stopping of the OTEL collection.
Solution :
Implement an ISM policy to manage disk space utilization effectively and prevent automatic stoppages.