Skip to content

PostgreSQL monitor fails with "Password is undefined"Β #6171

@kenlasko

Description

@kenlasko

πŸ“‘ I have found these related issues/pull requests

None found for this particular issue

πŸ›‘οΈ Security Policy

πŸ“ Description

I am trying to create a PostgreSQL monitor to periodically check replication status. I am able to create the monitor and the SQL query without issue with an appropriate connection string. However, the status never changes from offline. Looking at the logs, I see numerous logs like:

[MONITOR] WARN: Monitor #24 'Standby CNPG Cluster Sync': Failing: Password is undefined. | Interval: 60 seconds | Type: postgres | Down Count: 0 | Resend Interval: 0 

My password is correct and doesn't have any special characters warranting URL encoding. I've tried both methods:

I suspect there is supposed to be a password entry in the UI like with MariaDB, but this does not appear to be the case.

πŸ‘Ÿ Reproduction steps

  1. Create a new monitor of type PostgreSQL
  2. Set the connection string as per your environment
  3. Add a basic query like this:
SELECT CASE 
WHEN EXTRACT(EPOCH FROM (now() - pg_last_xact_replay_timestamp())) > 30 
    THEN 1
    ELSE 0
  END as is_lagging;
  1. Save the monitor and note it is shown as down.
  2. Review the logs and note the Password is undefined error.

πŸ‘€ Expected behavior

Either there should be a password field to enter the password separately or UptimeKuma should accept the password as entered in the connection string.

πŸ˜“ Actual Behavior

Monitor does not work

🐻 Uptime-Kuma Version

louislam\uptime-kuma:1.23.16

πŸ’» Operating System and Arch

Talos 1.11.2

🌐 Browser

Firefox 143.0.4 and Chrome Version 141.0.7390.66 (Official Build) (64-bit)

πŸ–₯️ Deployment Environment

  • Runtime Environment:
    • Kubernetes (K3S/K8S): Version 1.34.1
  • Database:
    • SQLite: Embedded
  • Database Storage:
    • Filesystem:
      • Linux: ext4
    • Storage Medium: SSD
  • Uptime Kuma Setup:
    • Number of monitors: 15

πŸ“ Relevant log output

[MONITOR] WARN: Monitor #24 'Standby CNPG Cluster Sync': Failing: Password is undefined. | Interval: 60 seconds | Type: postgres | Down Count: 0 | Resend Interval: 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions