Giter Club home page Giter Club logo

docker-events-notifier's People

Contributors

doubleaxe avatar hasnat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-events-notifier's Issues

CRITICAL : EOF error

Hey, I am using config:

---
version: "3"
services:
  docker-events-notifier-config:
    image: hairyhenderson/gomplate:v3.10.0-alpine
    container_name: docker-events-notifier-config
    entrypoint: ["/bin/sh","-c"]
    environment:
      CONFIG: |
        notifiers:
          slack:
            url: "https://hooks.slack.com/services/XXXX"
            template: /etc/docker-events-notifier/templates/slack.json
          email:
            url: "smtp://user:[email protected]:[email protected]&[email protected]&[email protected]"
            template: /etc/docker-events-notifier/templates/email.txt
        filters:
          event: ["stop", "die", "destroy"]
        notifications:
          - title: "Alert me when tianon/.* based container dies with exitCode 1"
            when_regex:
              status: ["(die|destroy)"]
              "Actor.Attributes.image": ["tianon/.*"]
            when:
              "Actor.Attributes.exitCode": ["1"]
            notify:
              - email
              - slack
          - title: "Alert only on slack when container dies with exitCode 0"
            when_regex:
              status: ["(die|destroy)"]
              "Actor.Attributes.image": ["hasnat/.*"]
            when:
              "Actor.Attributes.exitCode": ["0"]
            notify:
              - slack
          - title: "Alert me on anything happening to images by hasnat"
            when_regex:
              "Actor.Attributes.image": ["hasnat/.*"]
            notify:
              - email
              - slack
    command:
      - gomplate -i '{{ tmpl.Inline .Env.CONFIG }}' -o /etc/docker-events-notifier/config.yml
    volumes:
      - docker-events-notifier-config:/etc/docker-events-notifier/
    restart: on-failure:5
  docker-events-notifier:
    image: hasnat/docker-events-notifier:0.0.2
    container_name: docker-events-notifier
    depends_on:
      - docker-events-notifier-config
    environment:
      HOST_TAG: foo
      RLOG_LOG_LEVEL: DEBUG
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - docker-events-notifier-config:/etc/docker-events-notifier/
    restart: unless-stopped
networks:
  production-network:
      name: production-network

volumes:
  docker-events-notifier-config:
     driver: local

but getting:

2022-04-01T11:24:06Z DEBUG    : Event: HTTP/1.0 404 Not Found
2022-04-01T11:24:06Z DEBUG    : Not valid json event
2022-04-01T11:24:06Z DEBUG    : invalid character 'H' looking for beginning of value
2022-04-01T11:24:06Z DEBUG    : Event: Content-Type: application/json
2022-04-01T11:24:06Z DEBUG    : Not valid json event
2022-04-01T11:24:06Z DEBUG    : invalid character 'C' looking for beginning of value
2022-04-01T11:24:06Z DEBUG    : Event: Date: Fri, 01 Apr 2022 11:24:06 GMT
2022-04-01T11:24:06Z DEBUG    : Not valid json event
2022-04-01T11:24:06Z DEBUG    : invalid character 'D' looking for beginning of value
2022-04-01T11:24:06Z DEBUG    : Event: Content-Length: 29
2022-04-01T11:24:06Z DEBUG    : Not valid json event
2022-04-01T11:24:06Z DEBUG    : invalid character 'C' looking for beginning of value
2022-04-01T11:24:06Z DEBUG    : Event:
2022-04-01T11:24:06Z DEBUG    : Not valid json event
2022-04-01T11:24:06Z DEBUG    : EOF
2022-04-01T11:24:06Z DEBUG    : Event: {"message":"page not found"}
2022-04-01T11:24:06Z DEBUG    : Checking "Alert me when tianon/.* based container dies with exitCode 1"
2022-04-01T11:24:06Z DEBUG    : Checking "Alert only on slack when container dies with exitCode 0"
2022-04-01T11:24:06Z DEBUG    : Checking "Alert me on anything happening to images by hasnat"
2022-04-01T11:24:06Z CRITICAL : EOF
panic: EOF

goroutine 1 [running]:
main.MustNoErr(0x86e460, 0xc000010050, 0x0, 0x0, 0x0)
        /go/src/github.com/hasnat/docker-events-notifier/main.go:36 +0x194
main.MustByteArray(...)
        /go/src/github.com/hasnat/docker-events-notifier/main.go:62
main.main()
        /go/src/github.com/hasnat/docker-events-notifier/main.go:236 +0x3b7

Docker version: 20.10.14

Any ideas?

Thanks

Container does not start

Hello,

I configured the container on a Raspberry Pi 4B with Debian GNU/Linux 12 (bookworm) and Docker 25.03 as operating system.

The problem I report is that it does not start displaying the following error "exec ./docker-events-notifier: exec format error" .

I checked the config file with a yaml validator and there are no errors.

What's the problem?

Thanks for the help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.