Go to most recent revision | Blame | Last modification | View Log | RSS feed
// Put this file in /etc/icinga2/conf.d/...
// VNag - Nagios Framework for PHP
// Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
// Licensed under the terms of the Apache 2.0 license
//
// Revision 2018-07-15
object CheckCommand "vnag_x509_expire" {
command = [ "/daten/vnag/plugins/x509_expire/check_x509_expire" ]
arguments = {
"-f" = {
value = "$vnag_x509_expire_file$"
description = "File or filemask to be checked. There are two possible checking modes: If you put a # in front of the file mask, only the oldest file of each group will be checked (use this mode e.g. if you have a directory which contains old backups of certificates beside the current working certificate). Otherwise, all files of the file group are checked."
repeat_key = true
required = true
}
"-w" = {
value = "$vnag_x509_expire_warn$"
description = "Max age of file (warning range). You must use a Nagios compatible unit of measure (i.e. seconds)."
}
"-c" = {
value = "$vnag_x509_expire_crit$"
description = "Max age of file (critical range). You must use a Nagios compatible unit of measure (i.e. seconds)."
}
"-v" = {
set_if = "$vnag_x509_expire_verbose$"
description = "Additionally list files which are OK, not just the files which are out of the time range."
}
}
}
// Example usage:
//
// apply Service "example_letsencrypt_expiration" {
// import "generic-service"
// check_command = "vnag_x509_expire"
// vars = {
// vnag_x509_expire_file = [ "/daten/ssl/letsencrypt/*/certificate.pem" ]
// vnag_x509_expire_warn = "86400s" // 24h
// vnag_x509_expire_crit = "144000s" // 40h
// vnag_x509_expire_verbose = false
// }
// assign where host.name == NodeName
// }