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

Don't get any notification. #751

Closed
kpinarci opened this issue Dec 30, 2022 · 3 comments
Closed

Don't get any notification. #751

kpinarci opened this issue Dec 30, 2022 · 3 comments

Comments

@kpinarci
Copy link

Behaviour

For testing I started a nginx in version 1.20.1-alpine, this is scanned by diun and listed in manifests, but about the new version of nginx I get no notification.

As a notify I have telegraf set up, the test nofications about commandline also arrive.

Where exactly is my mistake?

Configuration

./diun.yml

watch:
  workers: 20
  schedule: "*/1 * * * *"
  firstCheckNotif: true
  compareDigest: true

providers:
  docker:
    watchByDefault: true

notif:
  telegram:
    token: 456****************
    chatIDs:
      - 16*********
    templateBody: |
      Docker tag {{ .Entry.Image }} which you subscribed to through {{ .Entry.Provider }} provider has been released. 

* docker-compose.yml

version: "3.5"
services:
  diun:
    image: "crazymax/diun:latest"
    container_name: diun
    hostname: diun
    command: serve
    volumes:
      - "/opt/con/diun/data:/data"
      - "/opt/con/diun/conf/diun.yml:/diun.yml:ro"
      - "/var/run/docker.sock:/var/run/docker.sock"
    environment:
      - "TZ=Europe/Berlin"
      - "LOG_LEVEL=debug"
      - "LOG_JSON=false"
    restart: always
      #    labels:
      #      logging: "promtail"
      #      logging_jobname: "containerlogs"
    networks:
      - intern

networks:
  intern:
   external: true

Logs

diun  | Fri, 30 Dec 2022 10:02:24 CET INF Found 5 image(s) to analyze provider=docker
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /run/containers/0/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.config/containers/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.docker/config.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.dockercfg
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials for docker.io found
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /run/containers/0/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.config/containers/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.docker/config.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.dockercfg
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials for docker.io found
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /run/containers/0/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.config/containers/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.docker/config.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.dockercfg
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials for docker.io found
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /run/containers/0/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.config/containers/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.docker/config.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.dockercfg
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials for docker.io found
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /run/containers/0/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.config/containers/auth.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.docker/config.json
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials matching docker.io found in /root/.dockercfg
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] No credentials for docker.io found
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Using registries.d directory /etc/containers/registries.d
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Returning credentials for docker.io/stonith404/pingvin-share from DockerAuthConfig
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image]  No signature storage configuration found for docker.io/stonith404/pingvin-share:latest, using built-in default file:///var/lib/containers/sigstore
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://registry-1.docker.io/v2/
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Using registries.d directory /etc/containers/registries.d
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Returning credentials for docker.io/crazymax/diun from DockerAuthConfig
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image]  No signature storage configuration found for docker.io/crazymax/diun:latest, using built-in default file:///var/lib/containers/sigstore
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://registry-1.docker.io/v2/
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Using registries.d directory /etc/containers/registries.d
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Returning credentials for docker.io/library/nginx from DockerAuthConfig
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image]  No signature storage configuration found for docker.io/library/nginx:1.20.1-alpine, using built-in default file:///var/lib/containers/sigstore
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://registry-1.docker.io/v2/
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Using registries.d directory /etc/containers/registries.d
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Returning credentials for docker.io/louislam/uptime-kuma from DockerAuthConfig
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image]  No signature storage configuration found for docker.io/louislam/uptime-kuma:latest, using built-in default file:///var/lib/containers/sigstore
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://registry-1.docker.io/v2/
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Using registries.d directory /etc/containers/registries.d
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Returning credentials for docker.io/portainer/portainer-ce from DockerAuthConfig
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image]  No signature storage configuration found for docker.io/portainer/portainer-ce:latest, using built-in default file:///var/lib/containers/sigstore
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://registry-1.docker.io/v2/
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Ping https://registry-1.docker.io/v2/ status 401
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://auth.docker.io/token?scope=repository%3Acrazymax%2Fdiun%3Apull&service=registry.docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Ping https://registry-1.docker.io/v2/ status 401
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://auth.docker.io/token?scope=repository%3Alibrary%2Fnginx%3Apull&service=registry.docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Ping https://registry-1.docker.io/v2/ status 401
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://auth.docker.io/token?scope=repository%3Aportainer%2Fportainer-ce%3Apull&service=registry.docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Ping https://registry-1.docker.io/v2/ status 401
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://auth.docker.io/token?scope=repository%3Astonith404%2Fpingvin-share%3Apull&service=registry.docker.io
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] Ping https://registry-1.docker.io/v2/ status 401
diun  | Fri, 30 Dec 2022 10:02:24 CET DBG [containers/image] GET https://auth.docker.io/token?scope=repository%3Alouislam%2Fuptime-kuma%3Apull&service=registry.docker.io
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG [containers/image] HEAD https://registry-1.docker.io/v2/crazymax/diun/manifests/latest
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG [containers/image] HEAD https://registry-1.docker.io/v2/portainer/portainer-ce/manifests/latest
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG [containers/image] HEAD https://registry-1.docker.io/v2/stonith404/pingvin-share/manifests/latest
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG [containers/image] HEAD https://registry-1.docker.io/v2/library/nginx/manifests/1.20.1-alpine
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG [containers/image] HEAD https://registry-1.docker.io/v2/louislam/uptime-kuma/manifests/latest
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG No changes image=docker.io/portainer/portainer-ce:latest provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG Manifest saved to database image=docker.io/portainer/portainer-ce:latest provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG No changes image=docker.io/stonith404/pingvin-share:latest provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG Manifest saved to database image=docker.io/stonith404/pingvin-share:latest provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG No changes image=docker.io/library/nginx:1.20.1-alpine provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG Manifest saved to database image=docker.io/library/nginx:1.20.1-alpine provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG No changes image=docker.io/crazymax/diun:latest provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG Manifest saved to database image=docker.io/crazymax/diun:latest provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG No changes image=docker.io/louislam/uptime-kuma:latest provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET DBG Manifest saved to database image=docker.io/louislam/uptime-kuma:latest provider=docker
diun  | Fri, 30 Dec 2022 10:02:25 CET INF Jobs completed added=0 failed=0 skipped=0 unchanged=5 updated=0
diun  | Fri, 30 Dec 2022 10:02:25 CET INF Next run in 50 seconds 824 milliseconds (2022-12-30 10:03:15.404911931 +0100 CET)

diun image list

/ # diun image list
+------------------------------------+-----------------+---------------+----------------------+-------------------------------------------------------------------------+
| NAME                               | MANIFESTS COUNT | LATEST TAG    | LATEST CREATED       | LATEST DIGEST                                                           |
+------------------------------------+-----------------+---------------+----------------------+-------------------------------------------------------------------------+
| docker.io/containrrr/watchtower    |               1 | latest        | 2022-11-05T18:16:14Z | sha256:897304ffb41533954deda3ca9dd140fa1ca41e5d7e0bc6d6352606931145779c |
| docker.io/crazymax/diun            |               1 | latest        | 2022-12-29T11:25:32Z | sha256:fa80af32a7c61128ffda667344547805b3c5e7721ecbbafd70e35bb7bb7c989f |
| docker.io/library/nginx            |               1 | 1.20.1-alpine | 2021-11-13T05:03:26Z | sha256:b92d3b942c8b84da889ac3dc6e83bd20ffb8cd2d8298eba92c8b0bf88d52f03e |
| docker.io/louislam/uptime-kuma     |               1 | latest        | 2022-12-26T16:23:57Z | sha256:5f77af4cd25f470cfc4c0ae1c40f6dc00c0d9d3f9cb9163744468569e6f55e8e |
| docker.io/portainer/portainer-ce   |               1 | latest        | 2022-11-21T00:40:18Z | sha256:f7607310051ee21f58f99d7b7f7878a6a49d4850422d88a31f8c61c248bbc3a4 |
| docker.io/stonith404/pingvin-share |               1 | latest        | 2022-12-21T17:31:14Z | sha256:9d40b92af82bbe8e7966831da8ddfab1e4ac1545e7b22ae15bdb745098cd179c |
+------------------------------------+-----------------+---------------+----------------------+-------------------------------------------------------------------------+
| TOTAL                              |               6 |               |                      |                                                                         |
+------------------------------------+-----------------+---------------+----------------------+-------------------------------------------------------------------------+

Test notify from telegraf

Docker tag docker.io/diun/testnotif:latest which you subscribed to through file provider has been released.
@crazy-max
Copy link
Owner

For testing I started a nginx in version 1.20.1-alpine,

I guess you mean a container using nginx:1.20.1-alpine. If so it will only scan this tag and nothing else. If you want to be notified of new tags being pushed to nginx repo you need to set diun.watch_repo=true label to this container: https://crazymax.dev/diun/providers/docker/#docker-labels

Be careful with this setting: https://crazymax.dev/diun/faq/#docker-hub-rate-limits

You might also just want to be notified of new tags for the alpine image. You can use the diun.include_tags label for this.

@kpinarci
Copy link
Author

My aim is to use Diun to scan all my container versions, if a new version is available in Dockerhub, then I want to be notified. And not label individual containers.

I have also added labels with in nginx container: "diun.enable=true", isn't that enough I also need "diun.watch_repo"?

@crazy-max
Copy link
Owner

My aim is to use Diun to scan all my container versions, if a new version is available in Dockerhub, then I want to be notified. And not label individual containers.

Atm you can't set watch_repo globally, see #491 for more info.

I have also added labels with in nginx container: "diun.enable=true", isn't that enough I also need "diun.watch_repo"?

No need to set diun.enable=true if watchByDefault option for the docker provider is enabled. But you have to set diun.watch_repo=true at the moment (see my previous comment).

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

No branches or pull requests

2 participants