1234567891011121314151617181920212223242526272829303132 |
- #
- # Old Icinga2 doesn't ship with check command for ssl_cert check
- # and new version have a different arguments definitions, so we
- # hack this by adding our own CheckCommand \o/
- #
- object CheckCommand "ssl_host_cert" {
- import "plugin-check-command"
- command = [ PluginDir + "/check_ssl_cert" ]
- arguments = {
- "-H" = "$ssl_cert_host$"
- "-f" = "$ssl_cert_file$"
- "-w" = "$ssl_cert_warn$"
- "-c" = "$ssl_cert_crit$"
- {%- if grains.osrelease|int > 10 %}
- "--ignore-sct" = {
- set_if = true
- }
- {%- endif %}
- {%- if grains.osrelease|int > 11 %}
- "--allow-empty-san" = {
- set_if = true
- }
- "--ignore-maximum-validity" = {
- set_if = true
- }
- {%- endif %}
- }
- vars.ssl_cert_host = "localhost"
- }
|