manios / docker-nagios

Docker image for Nagios Core in Alpine Linux with basic plugins, available for x86, x64 , ARM v6, ARM v7 and ARM64.
https://www.nagios.org/
Other
60 stars 28 forks source link

[Bug]: check_ssl_cert needs "file" binary #55

Closed blacktav closed 1 year ago

blacktav commented 1 year ago

What happened?

After adding the script check_ssl_cert, calling it fails with

SSL_CERT UNKNOWN sandbox.datactics.net: cannot find program: file

This is because the binary "file" is missing; rectified with apk add file

Image information

Image architecture

x86

Relevant log output

No response

manios commented 1 year ago

Hi @blacktav ,

Thanks for letting us know about that. However since, the check_ssl_cert is not included as a plugin in this image I am afraid that you have to extend the image according to your needs and add it yourself. This image as stated in README is meant to be lightweight in size and provide basic features.

Otherwise, you can use the core plugin check_ssl_validity instead:

/opt/nagios/libexec # ./check_ssl_validity  -H sandbox.datactics.net
Host sandbox.datactics.net matches CN sandbox.datactics.net on sandbox.datactics.net:443, still valid for 38.4 days. Serial ffffffffffffffff not found on any Certificate Revokation Lists.

Thank you for your time, Best regards, Christos

blacktav commented 1 year ago

Ah, thanks for the heads-up, I will try check_ssl_validity instead

Of course, it is not a big deal to add "file" to the OS