ssl_cert.conf 701 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # Old Icinga2 doesn't ship with check command for ssl_cert check
  3. # and new version have a different arguments definitions, so we
  4. # hack this by adding our own CheckCommand \o/
  5. #
  6. object CheckCommand "ssl_host_cert" {
  7. import "plugin-check-command"
  8. command = [ PluginDir + "/check_ssl_cert" ]
  9. arguments = {
  10. "-H" = "$ssl_cert_host$"
  11. "-f" = "$ssl_cert_file$"
  12. "-w" = "$ssl_cert_warn$"
  13. "-c" = "$ssl_cert_crit$"
  14. {%- if grains.osrelease|int > 10 %}
  15. "--ignore-sct" = {
  16. set_if = true
  17. }
  18. {%- endif %}
  19. {%- if grains.osrelease|int > 11 %}
  20. "--allow-empty-san" = {
  21. set_if = true
  22. }
  23. "--ignore-maximum-validity" = {
  24. set_if = true
  25. }
  26. {%- endif %}
  27. }
  28. vars.ssl_cert_host = "localhost"
  29. }