-
I used the example code to create metrics data and want to export them to prometheus. Here is my config.yaml: receivers:
otlp:
protocols:
grpc:
http:
processors:
batch:
exporters:
prometheus:
endpoint: "10.122.70.50:9090"
namespace: "testapp"
service:
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus] But otel-collector service failed and no useful message in logs:
However, if i use prometheusremotewrite as the expoter instead, it works well: receivers:
otlp:
protocols:
grpc:
http:
processors:
batch:
exporters:
prometheusremotewrite:
external_labels:
namespace: "remote_write"
endpoint: "http://10.122.70.50:9090/api/v1/write"
service:
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheusremotewrite] So what is the deference between prometheus and prometheusremotewrite? Why the prometheus exporter failed? |
Beta Was this translation helpful? Give feedback.
Answered by
koktlzz
Sep 9, 2021
Replies: 1 comment
-
Oh i realize that |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MrAlias
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh i realize that
prometheus
means export metrics and wait for any prometheus server pulling. Theprometheusremotewrite
means push the metrics to the specific prometheus server.