matteocorti / check_ssl_cert

A shell script (that can be used as a Nagios/Icinga plugin) to check an SSL/TLS connection.
GNU General Public License v3.0
372 stars 132 forks source link

check_ssl_cert_icinga2.conf: Fix syntax error near --nmap-wiht-proxy #508

Closed oxzi closed 7 months ago

oxzi commented 8 months ago

Fixes a syntax when parsing the Icinga 2 config due to a missing $.

Prior to this fix, the Icinga 2 output looks like the following:

[2024-03-24 15:14:11 +0100] critical/config: Error: Validation failed for object 'ssl_cert_extended' of type 'CheckCommand'; Attribute 'arguments' -> '--nmap-with-proxy' -> 'value': Validation failed: Closing $ not found in macro format string '$ssl_cert_extended_nmap_with_proxy'.
Location: in /etc/icinga2/conf.d/commands_check_ssl_cert.conf: 6:2-721:2
/etc/icinga2/conf.d/commands_check_ssl_cert.conf(4):  command = [ PluginDir + "/check_ssl_cert.sh" ]
/etc/icinga2/conf.d/commands_check_ssl_cert.conf(5):
/etc/icinga2/conf.d/commands_check_ssl_cert.conf(6):  arguments = {
                                                      ^^^^^^^^^^^^^
/etc/icinga2/conf.d/commands_check_ssl_cert.conf(7):   "--file" = {
[ . . . ]
[2024-03-24 15:14:11 +0100] critical/config: 1 error
[2024-03-24 15:14:11 +0100] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.
matteocorti commented 7 months ago

Thanks!

j340m3 commented 6 months ago

Hi, I stumbled upon this syntax error just today, using the release 2.81.0. Is this worth to push a 2.81.1? Or how is your roadmap in this regard?

matteocorti commented 6 months ago

2.81.1 released (I just forgot about the issue)