Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | // Put this file in /etc/icinga2/conf.d/... |
2 | |||
3 | // VNag - Nagios Framework for PHP |
||
4 | // Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com> |
||
5 | // Licensed under the terms of the Apache 2.0 license |
||
6 | // |
||
7 | // Revision 2018-07-15 |
||
8 | |||
9 | object CheckCommand "vnag_x509_expire" { |
||
10 | command = [ "/daten/vnag/plugins/x509_expire/check_x509_expire" ] |
||
11 | |||
12 | arguments = { |
||
13 | "-f" = { |
||
14 | value = "$vnag_x509_expire_file$" |
||
15 | 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." |
||
16 | repeat_key = true |
||
17 | required = true |
||
18 | } |
||
19 | "-w" = { |
||
20 | value = "$vnag_x509_expire_warn$" |
||
21 | description = "Max age of file (warning range). You must use a Nagios compatible unit of measure (i.e. seconds)." |
||
22 | } |
||
23 | "-c" = { |
||
24 | value = "$vnag_x509_expire_crit$" |
||
25 | description = "Max age of file (critical range). You must use a Nagios compatible unit of measure (i.e. seconds)." |
||
26 | } |
||
27 | "-v" = { |
||
28 | set_if = "$vnag_x509_expire_verbose$" |
||
29 | description = "Additionally list files which are OK, not just the files which are out of the time range." |
||
30 | } |
||
31 | } |
||
32 | } |
||
33 | |||
34 | // Example usage: |
||
35 | // |
||
36 | // apply Service "example_letsencrypt_expiration" { |
||
37 | // import "generic-service" |
||
38 | // check_command = "vnag_x509_expire" |
||
39 | // vars = { |
||
40 | // vnag_x509_expire_file = [ "/daten/ssl/letsencrypt/*/certificate.pem" ] |
||
41 | // vnag_x509_expire_warn = "86400s" // 24h |
||
42 | // vnag_x509_expire_crit = "144000s" // 40h |
||
43 | // vnag_x509_expire_verbose = false |
||
44 | // } |
||
45 | // assign where host.name == NodeName |
||
46 | // } |