Categorygithub.com/logocomune/webhookdocker
modulepackage
1.3.1
Repository: https://github.com/logocomune/webhookdocker.git
Documentation: pkg.go.dev

# README

Webhook Docker

Docker Pulls Go Report Card

A Keybase, Slack and WebEx integration to notify Docker Events via incoming webhook

Keybase webhook setup

  • Add webhookbot from list of Bots
  • Create a new webhook for sending messages into the current conversation. You must supply a name as well to identify the webhook. Example: !webhook create alerts
  • Get the new URL to send webhooks

Docker events on keybase

Slack webhook setup

Docker events on keybase

WebEx webhook setup

Docker events on WebEx

Run

Capture docker events and send to Keybase:

$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro \
logocomune/webhook-docker:v1.3.1 --keybase-endpoint=https://bots.keybase.io/webhookbot/....

Capture docker events and send to Slack:

$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro \
logocomune/webhook-docker:v1.3.1 --slack-endpoint=https://hooks.slack.com/services/....

Capture docker events and send to WebEx:

$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro \
logocomune/webhook-docker:v1.3.1 --webex-endpoint=https://api.ciscospark.com/v1/webhooks/incoming/....

Application options

flagEnvironmenttypeDefault
--node-nameWD_NODE_NAMEStringNode name. If empty use the hostname
--hide-node-nameWD_HIDE_NODE_NAMEBooleanfalseNode name is omitted
--docker-external-instance-inspectionWD_DOCKER_EXTERNAL_INSTANCE_INSPECTIONStringAdd an external inspection url. Eg: https://myhost.ext/inspection/#/containers/__ID__
--docker-show-runningWD_DOCKER_SHOW_RUNNINGBooleanfalseSend running container to webhook
--docker-listen-container-eventsWD_DOCKER_LISTEN_CONTAINER_EVENTSBooleantrueListen for container events
--docker-listen-network-eventsWD_DOCKER_LISTEN_NETWORK_EVENTSBooleantrueListen for network events
--docker-listen-volume-eventsWD_DOCKER_LISTEN_VOLUME_EVENTSBooleantrueListen for volume events
--docker-listen-container-actionsWD_DOCKER_LISTEN_CONTAINER_ACTIONSStrings separated by ;attach;create;destroy;detach;die;kill;oom;pause;rename;restart;start;stop;unpause;updateDocker container events
--docker-listen-network-actionsWD_DOCKER_LISTEN_NETWORK_ACTIONSStrings separated by ;create;connect;destroy;disconnect;removeDocker network events
--docker-listen-volume-actionsWD_DOCKER_LISTEN_VOLUME_ACTIONSStrings separated by ;create;destroy;mount;unmountDocker volume events
--docker-filter-container-nameWD_DOCKER_FILTER_CONTAINER_NAMERegexpFilter events by container name (default all)
--docker-filter-negate-container-nameWD_DOCKER_FILTER_NEGATE_CONTAINER_NAMEBooleanfalseNegate the filter of container name
--docker-filter-image-nameWD_DOCKER_FILTER_IMAGE_NAMERegexpFilter events by image name (default all)
--docker-filter-negate-image-nameWD_DOCKER_FILTER_NEGATE_IMAGE_NAMEBooleanfalseNegate the filter of image name
--keybase-endpointWD_KEYBASE_ENDPOINTStringKeybase endpoint for webhook
--slack-endpointWD_SLACK_ENDPOINTStringSlack endpoint for webhook
--webex-endpointWD_WEBEX_ENDPOINTStringWebEx endpoint for webhook

Regexp Filters

Capture events of container with names with the following formats:

  • exec-1234
  • exec-abcd-12345
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro \
--docker-filter-container-name="^exec-.*$" \
logocomune/webhook-docker:latest --webex-endpoint=https://api.ciscospark.com/v1/webhooks/incoming/....

Exclude events of container with the following formats:

  • exec-1234
  • exec-abcd-12345
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro \
--docker-filter-container-name="^exec-.*$" \
--docker-filter-negate-container-name \
logocomune/webhook-docker:latest --webex-endpoint=https://api.ciscospark.com/v1/webhooks/incoming/....

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author