alerta / docker-alerta

Run alerta in a docker container
https://hub.docker.com/r/alerta/alerta-web
MIT License
159 stars 139 forks source link

Helm chart alerta-web: Issue with DB connections #481

Closed thaisroch closed 5 months ago

thaisroch commented 6 months ago

Subject: Helm chart alerta-web: Issue with DB connections Hi there,

I'm trying to configure the alerta-web Helm chart to use MongoDB or PostgreSQL as the database.

Steps Taken:

  1. Set DATABASE_URL in values.yaml to mongodb://mongodbUsername:mongodbPassword@host-mongodb:27017/monitoring or postgresql://user_name:password@host_db:5432/monitoring
  2. Disabled requirements.yml to prevent PostgreSQL installation.
  3. Disabled PostgreSQL with enabled: false in values.yaml

    Problem:

After installing the chart, the alerta pod gets stuck in a crash loop backoff state. The logs show a SyntaxError: invalid syntax at DATABASE_URL in alertad.conf.

Error Analysis: There seems to be an error when applying the database connection endpoint within double quotes. This causes the endpoint to not be recognized as a string and not be passed to the configmap created by the deployed release, resulting in a syntax error.

Mode Improvisation:

DATABASE_URL: |
  "postgresql://user_name:password@host-db:5432/monitoring"

or

DATABASE_URL: |
  "mongodb://user_name:password@host-db:5432/monitoring"

Thanks, Thais Rocha.


Environment