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

WRN No notifier available #118

Closed
Chris92ch opened this issue Jun 30, 2020 · 3 comments
Closed

WRN No notifier available #118

Chris92ch opened this issue Jun 30, 2020 · 3 comments

Comments

@Chris92ch
Copy link

Hello ! I'm currently trying diun but I have some strange logs when I'm trying to send a test notification to my slack webhook

Tue, 30 Jun 2020 17:04:38 CEST WRN No notifier available

Notify configuration

I only want to write to a slack channel via a webhook. Here's my config :

db:
  path: diun.db

watch:
  workers: 10
  schedule: "0 * * * *"
  firstCheckNotif: false

notif:
  slack:
    enable:true
    webhookURL: https://hooks.slack.com/services/xxxxxxxx

regopts:
  - name: "docker.io"
    selector: image

providers:
  file:
    filename: /providers.yml

And here's my docker compose file :

`version: "3.5"

services:
  diun:
    image: crazymax/diun:latest
    container_name: diun
    volumes:
      - "./data:/data"
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "./diun.yml:/diun.yml"
      - "./providers.yml:/providers.yml"
    environment:
      - "TZ=Europe/Paris"
      - "LOG_LEVEL=info"
      - "LOG_JSON=false"
      - "DIUN_WATCH_WORKERS=10"
      - "DIUN_WATCH_SCHEDULE=0 * * * *"
      - "DIUN_PROVIDERS_DOCKER=true"
      - "DIUN_PROVIDERS_DOCKER_WATCHSTOPPED=true"
    labels:
      - "diun.enable=true"
      - "diun.watch_repo=true"
    restart: always

`

Seems that this configuration isn't enough to be able to send some notifs via slack ... Do you know what's wrong or missing ?

Best regards and thanks for now
Chris.

@crazy-max
Copy link
Owner

crazy-max commented Jun 30, 2020

Hi @Chris92ch,

Looking at your config it looks like you're migrating from Diun v2 because your config file is malformed. enable field does not exist since Diun v3.

If you want to include your Diun config in your compose service you have to set the env var CONFIG. See this section and #107 (comment) for more info.

Checkout the Quick start with the Docker provider section to get started.

Tue, 30 Jun 2020 17:04:38 CEST WRN No notifier available

And please include all logs next time ;)

@Chris92ch
Copy link
Author

Hello @crazy-max

Thanks for your answer. You're right, the config seems now ok (my logs look better and now find images). Sadly, I still cannot launch a docker exec to test the notifications

docker exec -it IdOfMyDocker diun --test-notif

The only output I got when I try this is

Tue, 30 Jun 2020 17:56:23 CEST FTL Cannot initialize Diun error=timeout

I got no message regarding this notification in the logs.

This is my current config :

db:
  path: diun.db

watch:
  workers: 10
  schedule: "0 * * * *"
  firstCheckNotif: false

notif:
  slack:
    webhookURL: https://hooks.slack.com/services/WebhookURLxxxxx

regopts:
  - name: "docker.io"
    selector: image

providers:
  file:
    filename: /providers.yml

Best regards
Chris.

@crazy-max
Copy link
Owner

crazy-max commented Jun 30, 2020

@Chris92ch

Tue, 30 Jun 2020 17:56:23 CEST FTL Cannot initialize Diun error=timeout

That's because an instance of Diun is already running.

If you want to test notifications you can use docker run:

$ docker run --rm -it \
  -v "$(pwd)/diun.yml:/diun.yml"
  -v "$(pwd)/providers.yml:/providers.yml"
  crazymax/diun:latest --config /diun.yml --test-notif

I will update the documentation about that.

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

2 participants