Icinga / docker-icinga2

Official Icinga 2 Docker images
GNU General Public License v2.0
67 stars 30 forks source link

Add curl to the image to allow integration of scripts that use webhooks without modifying the base image. #55

Closed dwt closed 3 years ago

dwt commented 3 years ago

I found that many scripts to trigger web hooks require curl.

For example to trigger a notification in Telegram, a curl comand like this is required:

/usr/bin/curl --silent --output /dev/null --data-urlencode chat_id=$chat_id --data-urlencode "text=$notification_text" --data-urlencode parse_mode=HTML --data-urlencode disable_web_page_preview=true https://api.telegram.org/$bot_id/sendMessage

Also the ca-certificates package was added, to allow validating certificates.

dwt commented 3 years ago

ca-certificates are also required for #52 so I guess that is uncontroversial. curl adds about 400kb to the final image size.

I would hope that this is an acceptable tradeoff to allow integration of many web hook based services without having to derive an image from the base image.

Al2Klimov commented 3 years ago

Sigh.. I intentionally didn’t mention this before #52 not to let the author rebase twice.

dwt commented 3 years ago

@N-o-X @Al2Klimov rebased and ready to merge. I'd love some feedback if possible.

N-o-X commented 3 years ago

Sorry for those rebases, didn't have this PR in mind.

I'll merge this, once the build is done.

Thanks for contributing!

dwt commented 3 years ago

@N-o-X Since I haven't found out yet, how often do you release image changes to the docker hub?

Al2Klimov commented 3 years ago

Master (snapshot): once every master commit Release: once every upstream release

dwt commented 3 years ago

thx