Rev 52 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
52 | 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 2022-06-06 |
||
8 | |||
53 | daniel-mar | 9 | // ATTENTION! |
10 | // To make this work, you need to add following to /etc/sudoers (adjust the paths) |
||
11 | // nagios ALL=(root) NOPASSWD:/daten/vnag/plugins/open_deleted_files/check_open_deleted_files |
||
12 | // You MUST make sure that the script check_hp_smartarray and all other VNag scripts are |
||
13 | // owned by root, otherwise the owner could change the code, and it would be executed with |
||
14 | // root privileges! |
||
15 | |||
52 | daniel-mar | 16 | object CheckCommand "vnag_open_deleted_files" { |
53 | daniel-mar | 17 | command = [ |
18 | "/usr/bin/sudo", |
||
52 | daniel-mar | 19 | |
53 | daniel-mar | 20 | // PLEASE ADJUST THIS PATH |
21 | "/daten/vnag/plugins/open_deleted_files/check_open_deleted_files" |
||
22 | ] |
||
23 | |||
52 | daniel-mar | 24 | arguments = { |
25 | "-d" = { |
||
26 | value = "$vnag_open_deleted_files_dir$" |
||
27 | description = "Directory to check (e.g. /tmp)" |
||
28 | } |
||
29 | "-w" = { |
||
30 | value = "$vnag_open_deleted_files_warn$" |
||
31 | description = "absoluteKB (Warning range)" |
||
32 | } |
||
33 | "-c" = { |
||
34 | value = "$vnag_open_deleted_files_crit$" |
||
35 | description = "absoluteKB (Critical range)" |
||
36 | } |
||
37 | } |
||
38 | } |
||
39 | |||
40 | // Example usage: |
||
41 | // |
||
42 | // apply Service "example_server1_open_deleted_files" { |
||
43 | // import "generic-service" |
||
44 | // check_command = "vnag_open_deleted_files" |
||
45 | // |
||
46 | // vars = { |
||
47 | // vnag_open_deleted_files_dir = "/tmp" |
||
48 | // vnag_open_deleted_files_warn = "300MB" |
||
49 | // vnag_open_deleted_files_crit = "700MB" |
||
50 | // } |
||
51 | // |
||
52 | // assign where host.name == NodeName |
||
53 | // } |