Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus exporter not able to read/open certificate file for tls #22186

Open
ankitb11 opened this issue Jan 12, 2025 · 0 comments
Open

Prometheus exporter not able to read/open certificate file for tls #22186

ankitb11 opened this issue Jan 12, 2025 · 0 comments
Labels
type: bug A code related bug.

Comments

@ankitb11
Copy link

ankitb11 commented Jan 12, 2025

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

I am trying to enable tls for my prometheus exporter, but for some reason the exported is unable to read cert_file, but is able to read the key file.

vector::sinks::prometheus::exporter: Failed to start Prometheus exporter: Could not open certificate file "/home/pi/vector-cert/cert.pem": No such file or directory (os error 2)

i have the correct permission set for this file

-rwxrwxrwx 1 pi pi 1939 Jan 11 19:38 cert.pem

I generated these files using command

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365

Any pointers about what i am doing wrong?

Configuration

prometheus_metrics:
    type: prometheus_exporter
    inputs:
      - parse_metrics
    address: 0.0.0.0:9598
    flush_period_secs: 30
    tls:
      enabled: true
      crt_file: "/home/pi/vector-cert/cert.pem"
      key_file: "/home/pi/vector-cert/key.pem"
      key_pass: "<>"
      verify_hostname: false
      verify_certificate: false 

Version

vector 0.43.1 (aarch64-unknown-linux-musl e30bf1f 2024-12-10 16:14:47.175528383)

Debug Output

No response

Example Data

No response

Additional Context

No response

References

No response

@ankitb11 ankitb11 added the type: bug A code related bug. label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

1 participant