Who rated this post

cancel
Showing results for 
Search instead for 
Did you mean: 
Jeremy1
Explorer

Hi team, 

Hope everything is going well.

I was able to solve the problem; in my case were 2 things

1. Different versions of otelcol

I observed that the version of otelcol was different from the most updated version; today it is 116.0; before it was 82.0. The following command can be used to verify the otelcol version:
#/opt/CPotelcol/otelcol --version


These were the error messages I had:

"2025/04/24 09:36:03 failed to upload metrics: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /opt/CPotelcol/grpc_otlp.sock: connect: no such file or directory"

The 'grpc_otlp.sock' in 82.0 otelcol version suddenly disappeared, so I was having that error.

In 116.0 otelcol version, the .sock appears again, so I was able to send metrics again. It updated automatically, as you can see in the next messages:

admin localhost t +otlp:otelcol:backup:version CPotelcol_0.82.0
Configuration changed from localhost by user admin by the service /bin/dbset
Configuration changed from localhost by user admin by the service /bin/dbset
admin localhost t +otlp:otelcol:active_config_version CPotelcol_0.116.0


2. Issues with mapping metrics.

When I ran the cpview -m command, I noticed that not all the metrics I wanted were sent, so I validated the error messages and showed the following:

"caller=metrics_instruments.go:138 level=warn msg="Metric system.cpu.utilization does not exist in metricsLastSample.Metrics"

It was quite strange since no file had been modified.

For example, if you searched the system.cpu.utilization metric with the following command:
# cpview -m -f M:"system.cpu.utilization" | jq '.'
The output was null

Additionally, I validated that it was found in the metrics repository according to the following command:
#sklnctl otelcol metrics --show

And it was mapped; however, still not sent the metric.

So I decided to stop and start the cpview service with the next commands:

cpview -s off

cpview -a off

and then,

cpview -s on

cpview -a on

Next, I checked if the mapped system.cpu.utilization metric will be found, and in fact, it already appeared:

#cpview -m | jq '.' | grep -i metric\-id

"metric-id": "system.cpu.utilization"

My issue was solved.

(2)
Who rated this post