This is what i did
global:
  smtp_smarthost: smtp.zoho.com:587
  smtp_from: [email protected]
  smtp_auth_username: '[email protected]'
  smtp_auth_password: 'command60'
  smtp_require_tls: true
tls_config:
  cert_file: /home/chinelo/alertmanager.crt
  key_file: /home/chinelo/alertmanager.key
receivers:
  - name: send_email
    email_configs:
      - to: [email protected]
        from: [email protected]
        smarthost: smtp.zoho.com:587
        auth_username: [email protected]
        auth_password: password
        require_tls: true
  - name: send_email2
    email_configs:
      - to: [email protected]
        from: [email protected]
        smarthost: smtp.zoho.com:587
        auth_username: [email protected]
        auth_password: password
        require_tls: true
route:
  receiver: send_email
  routes:
    - receiver: send_email2
inhibit_rules:
  - source_match:
      severity: critical
    target_match:
      severity: warning
    equal:
      - alertname
      - dev
      - instance


The error

:58:49.480Z caller=coordinator.go:118 level=error component=configuration
msg="Loading configuration file failed"
file=/etc/alertmanager/alertmanager.yml err="yaml: unmarshal errors:\n
 line 7: field tls_config not found in type config.plain"
Sep 15 17:58:49 localhost alertmanager[2767706]:
ts=2024-09-15T17:58:49.480Z caller=cluster.go:692 level=info
component=cluster msg="gossip not settled but continuing anyway" polls=0
elapsed=34.861156ms
Sep 15 17:58:49 localhost systemd[1]: alertmanager.service: Main process
exited, code=


On Sun, 15 Sept 2024 at 18:46, 'Brian Candler' via Prometheus Users <
[email protected]> wrote:

> Show what you did, and what the error was, and then maybe we can help you.
>
> There are some global settings that cover common use cases:
>
> https://prometheus.io/docs/alerting/latest/configuration/#file-layout-and-global-settings
>
> However, if you need more control (e.g. for client certificate auth or
> accepting self-signed certificates from the E-mail server) you'll need to
> use tls_config under the email receiver definition:
> https://prometheus.io/docs/alerting/latest/configuration/#email_config
> https://prometheus.io/docs/alerting/latest/configuration/#tls_config
>
> On Sunday 15 September 2024 at 16:48:16 UTC+1 Chinelo Ufondu wrote:
>
>> Hello all!!
>>
>> I am currently trying to configure TLS in my alert manager configuration
>> file to enable it authenticate to my smtp host, I have tried various
>> options from the documentation and forums , but all to no avail. I would
>> appreciate if I am being assisted with this blocker.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/a1d49d1e-7761-4897-9c43-72d54ce3278fn%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/a1d49d1e-7761-4897-9c43-72d54ce3278fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAL2E%2B82qm7kc_NKJniVJN2N0%2BwpAqq1hN-zQ4adHPPcdYrUwOA%40mail.gmail.com.

Reply via email to