Rev 80 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
80 | 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 2023-10-14 |
||
8 | |||
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/bin/megaraid.phar |
||
12 | // You MUST make sure that the script check_megaraid 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 | |||
16 | object CheckCommand "vnag_megaraid" { |
||
17 | command = [ |
||
18 | "/usr/bin/sudo", |
||
19 | |||
20 | // PLEASE ADJUST THIS PATH |
||
21 | "/daten/vnag/bin/megaraid.phar" |
||
22 | ] |
||
23 | |||
24 | arguments = { |
||
25 | } |
||
26 | } |
||
27 | |||
28 | // Example usage: |
||
29 | // |
||
30 | // apply Service "example_megaraid" { |
||
31 | // import "generic-service" |
||
32 | // check_command = "vnag_megaraid" |
||
33 | // check_interval = 15m |
||
34 | // vars = { |
||
35 | // } |
||
36 | // assign where host.name == NodeName |
||
37 | // } |