Getting error " tls: unknown certificate "

697 views
Skip to first unread message

Sandeep Dwivedi

unread,
Mar 22, 2022, 7:31:53 AM3/22/22
to Prometheus Users
Hello Users

I have configured SSL and basic auth into Prometheus and Alert Manager.

Now getting error and not able to receive alert via e-mail. Earlier when SSL was not configured I was able to get alerts on email.

Below is my Prometheus.yaml

# my global config
global:
  scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
    - scheme: https
      tls_config:
        insecure_skip_verify: true
        cert_file: /app/pms/certs/certificate.cer
        key_file: /app/pms/certs/key.pem
      basic_auth:
        username: user
        password: password
      static_configs:
        - targets: ["server fqdn:9093"]

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  - "target_missing.yaml"
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "prometheus"

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.
    static_configs:
      - targets: ["server fqdn:9090"]
    scheme: https
    tls_config:
      insecure_skip_verify: true
      cert_file: /app/pms/certs/certificate.cer
      key_file: /app/pms/certs/.pem
    basic_auth:
      username: user
      password: password

I am able to see alert on Alert manager portal but not to email, alertmanager.yaml is below

                global:
                  smtp_require_tls: false
                route:
                  group_by: ['alertname']
                  group_wait: 30s
                  group_interval: 5m
                  repeat_interval: 1h
                  receiver: 'email'
                receivers:
                - name: 'email'
                  email_configs:
                  - to: 'mi...@xyz.com'
                        from: 'alertm...@xyz.com'
                        smarthost: smtprelay.xyz.com:25
                        send_resolved: true
                        require_tls: false
                inhibit_rules:
                  - source_match:
                          severity: 'critical'
                        target_match:
                          severity: 'warning'
                        equal: ['alertname', 'instance']


Error

2022-03-11T10:06:40.880594-05:00 server01 alertmanager[93284]: 2022/03/11 10:06:40 http: TLS handshake error from 10.250.219.87:54974: remote error: tls: unknown certificate authority

Thanks
Sandeep
Reply all
Reply to author
Forward
Message has been deleted
0 new messages