Skip to content

[BUG] first path segment in URL cannot contain colon with discord notifier #745

@remi-espie

Description

@remi-espie

Describe the bug
I use scrutiny:master-omnibus with Docker Compose.
I set the environment variable SCRUTINY_NOTIFY_URLS to "discord://<token>@<webhookid>".
When I run curl -X POST http://localhost:8080/api/health/notify, I have the following error:

{"errors":["error initializing router services: parse \"\\\"discord://<token>@<webhookid>\\\"\": first path segment in URL cannot contain colon"],"success":false}

Expected behavior
For scrutiny to send a test notification to Discord.

docker-compose.yml

version: '3.5'

services:
  scrutiny:
    container_name: scrutiny
    image: ghcr.io/analogj/scrutiny:master-omnibus
    cap_add:
      - SYS_RAWIO
    ports:
      - "8080:8080" # webapp
    volumes:
      - /run/udev:/run/udev:ro
      - ./config:/opt/scrutiny/config
      - ./influxdb:/opt/scrutiny/influxdb
    environment:
      - SCRUTINY_NOTIFY_URLS="discord://<token>@<webhookid>"
    devices:
      - "/dev/sda"
      - "/dev/sdb"
    restart: unless-stopped

Log Files

scrutiny  | Start the scrutiny server
scrutiny  | 2025/01/29 13:59:12 No configuration file found at /opt/scrutiny/config/scrutiny.yaml. Using Defaults.
scrutiny  | time="2025-01-29T13:59:12Z" level=info msg="Trying to connect to scrutiny sqlite db: /opt/scrutiny/config/scrutiny.db\n" type=web
scrutiny  | time="2025-01-29T13:59:12Z" level=info msg="Successfully connected to scrutiny sqlite db: /opt/scrutiny/config/scrutiny.db\n" type=web
scrutiny  | time="2025-01-29T13:59:12Z" level=info msg="InfluxDB certificate verification: true\n" type=web
scrutiny  | time="2025-01-29T13:59:12Z" level=info msg="Database migration starting. Please wait, this process may take a long time...." type=web
scrutiny  | time="2025-01-29T13:59:12Z" level=info msg="Database migration completed successfully" type=web
scrutiny  | time="2025-01-29T13:59:12Z" level=info msg="SQLite global configuration migrations starting. Please wait...." type=web
scrutiny  | time="2025-01-29T13:59:12Z" level=info msg="SQLite global configuration migrations completed successfully" type=web
scrutiny  | time="2025-01-29T13:59:43Z" level=info msg="Sending notifications to \"discord://<token>@<webhookid>\"" type=web
scrutiny  | time="2025-01-29T13:59:43Z" level=error msg="An error occurred while sending notifications \"discord://<token>@<webhookid>\": error initializing router services: parse \"\\\"discord://<token>@<webhookid>\\\"\": first path segment in URL cannot contain colon" type=web
scrutiny  | time="2025-01-29T13:59:43Z" level=error msg="One or more notifications failed to send successfully. See logs for more information." type=web
scrutiny  | time="2025-01-29T13:59:43Z" level=error msg="An error occurred while sending test notification error initializing router services: parse \"\\\"discord://<token>@<webhookid>\\\"\": first path segment in URL cannot contain colon" type=web
scrutiny  | time="2025-01-29T13:59:43Z" level=error msg="192.168.16.1 - 4891be7098ef [29/Jan/2025:13:59:43 +0000] \"POST /api/health/notify\" 500 231 \"\" \"curl/7.88.1\" (1ms)" clientIP=192.168.16.1 hostname=4891be7098ef latency=1 method=POST path=/api/health/notify referer= respLength=231 statusCode=500 type=web userAgent=curl/7.88.1
docker info Client: Docker Engine - Community Version: 27.5.1 Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.20.0 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.32.4 Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 22
Running: 22
Paused: 0
Stopped: 0
Images: 49
Server Version: 27.5.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc version: v1.2.4-0-g6c52b3f
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.1.0-30-amd64
Operating System: Debian GNU/Linux 12 (bookworm)
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 31.12GiB
Name: nas
ID: f2d7c9c9-6a5b-42a5-a420-3069aee47d76
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

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