Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
error decoding 'receivers': unknown type: "postgresql" for id: "postgresql" (valid values: [jaeger kafka opencensus prometheus zipkin otlp hostmetrics]) 2024/03/13 08:50:44 collector server run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
error decoding 'receivers': unknown type: "postgresql" for id: "postgresql" (valid values: [jaeger kafka opencensus prometheus zipkin otlp hostmetrics])
Why is postgresql not a valid type for a receiver in the OTEL collector? This is the example config from the github, where the receiver is clearly named "postgresql":
Example Configuration receivers: postgresql: endpoint: localhost:5432 transport: tcp username: otel password: ${env:POSTGRESQL_PASSWORD} databases: - otel collection_interval: 10s tls: insecure: false insecure_skip_verify: false ca_file: /home/otel/authorities.crt cert_file: /home/otel/mypostgrescert.crt key_file: /home/otel/mypostgreskey.key
How can I fix this?
I tried simply adding a new receiver called postgresql. The pre-reqs mentioned on the github I have fulfilled; I have a user with the "SELECT on pg_stat_database" granted. this is my otel config receiver: postgresql: username: otel password: otel collection_interval: 5s tls: insecure: true