Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving blank messages with discord notifier #1739

Open
w1ld3r opened this issue Aug 21, 2023 · 2 comments
Open

Receiving blank messages with discord notifier #1739

w1ld3r opened this issue Aug 21, 2023 · 2 comments

Comments

@w1ld3r
Copy link

w1ld3r commented Aug 21, 2023

Describe the bug

Using the follwong docker-compose.yml, I'm getting blank message on discord:

version: '3.7'

services:
  watchtower:
    container_name: watchtower
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - "8080:8080"
    environment:
      WATCHTOWER_DEBUG: true
      WATCHTOWER_LOG_LEVEL: debug
      WATCHTOWER_POLL_INTERVAL: 60
      WATCHTOWER_HTTP_API_METRICS: true
      WATCHTOWER_HTTP_API_TOKEN: demotoken
      WATCHTOWER_LABEL_ENABLE: true
      WATCHTOWER_CLEANUP: true
      WATCHTOWER_NOTIFICATION_REPORT: true
      WATCHTOWER_NOTIFICATIONS: shoutrrr
      WATCHTOWER_NOTIFICATIONS_LEVEL: info
      WATCHTOWER_NOTIFICATION_URL: "discord://token@id"
      WATCHTOWER_NOTIFICATION_TEMPLATE: |
        {{- if .Report -}}
          {{- with .Report -}}
        {{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed
              {{- range .Updated}}
        - {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}}
              {{- end -}}
              {{- range .Fresh}}
        - {{.Name}} ({{.ImageName}}): {{.State}}
            {{- end -}}
            {{- range .Skipped}}
        - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
            {{- end -}}
            {{- range .Failed}}
        - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
            {{- end -}}
          {{- end -}}
        {{- else -}}
          {{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}}
        {{- end -}}

#      WATCHTOWER_ROLLING_RESTART: "true"
#      WATCHTOWER_MONITOR_ONLY: "true"


  prometheus:
    container_name: prometheus
    image: prom/prometheus
    volumes:
      - ./prometheus/:/etc/prometheus/
      - prometheus:/prometheus/
    ports:
      - "9091:9090"
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  grafana:
    container_name: grafana
    image: grafana/grafana
    ports:
      - "3000:3000"
    environment:
      GF_INSTALL_PLUGINS: grafana-clock-panel,grafana-simple-json-datasource
    volumes:
      - grafana:/var/lib/grafana
      - ./grafana:/etc/grafana/provisioning
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

volumes:
  prometheus: {}
  grafana: {}

Steps to reproduce

  1. docker-compose up -d --build

Expected behavior

Receive messages in discord using shoutrrr

Screenshots

No response

Environment

  • Kernel 6.1.0-11-amd64
  • Docker version 20.10.24+dfsg1, build 297e128

Your logs

watchtower  | time="2023-08-21T16:06:28+02:00" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized
."
watchtower  | time="2023-08-21T16:06:29+02:00" level=debug msg="Making sure everything is sane before starting"
watchtower  | time="2023-08-21T16:06:29+02:00" level=debug msg="Retrieving running containers"
watchtower  | time="2023-08-21T16:06:29+02:00" level=debug msg="There are no additional watchtower containers"
watchtower  | time="2023-08-21T16:06:29+02:00" level=info msg="Watchtower v1.5.3-70-g0d2eba1"
watchtower  | time="2023-08-21T16:06:29+02:00" level=info msg="Using notifications: discord"
watchtower  | time="2023-08-21T16:06:29+02:00" level=info msg="Only checking containers using enable label"
watchtower  | time="2023-08-21T16:06:29+02:00" level=info msg="Scheduling first run: 2023-08-21 16:07:29 +0200 CEST"
watchtower  | time="2023-08-21T16:06:29+02:00" level=info msg="Note that the first check will be performed in 59 seconds"

Additional context

No response

@github-actions
Copy link

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@w1ld3r
Copy link
Author

w1ld3r commented Aug 21, 2023

Doing some debug, I can get message (using LocalLoc) before it's behing sent to Router.Send. So error should comme from shoutrrr ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant