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 | object CheckCommand "vnag_ipfm" { |
||
10 | // PLEASE ADJUST THIS PATH |
||
11 | command = [ "/daten/vnag/bin/ipfm.phar" ] |
||
12 | |||
13 | arguments = { |
||
14 | "-w" = { |
||
15 | value = "$vnag_ipfm_currentWarn$,$vnag_ipfm_expectedWarn$" |
||
16 | description = "<currentTraffic>GB,<expectedTraffic>GB (Warning range)" |
||
17 | } |
||
18 | "-c" = { |
||
19 | value = "$vnag_ipfm_currentCrit$,$vnag_ipfm_expectedCrit$" |
||
20 | description = "<currentTraffic>GB,<expectedTraffic>GB (Critical range)" |
||
21 | } |
||
22 | "-l" = { |
||
23 | value = "$vnag_ipfm_limit$" |
||
24 | description = "The monthly limit of your provider (just for optical measurement)" |
||
25 | } |
||
26 | "-L" = { |
||
27 | value = "$vnag_ipfm_logDir$" |
||
28 | description = "Directory of the ipfm log files (default /var/log/ipfm)" |
||
29 | } |
||
30 | } |
||
31 | } |
||
32 | |||
33 | // Example usage: |
||
34 | // |
||
35 | // apply Service "example_eth0_ipfm" { |
||
36 | // import "generic-service" |
||
37 | // check_command = "vnag_ipfm" |
||
38 | // vars = { |
||
39 | // vnag_ipfm_currentWarn = "6TB" |
||
40 | // vnag_ipfm_currentCrit = "8TB" |
||
41 | // vnag_ipfm_expectedWarn = "8TB" |
||
42 | // vnag_ipfm_expectedCrit = "15TB" |
||
43 | // vnag_ipfm_limit = "10TB" |
||
44 | // vnag_ipfm_logDir = "/var/log/ipfm" |
||
45 | // } |
||
46 | // assign where host.name == NodeName |
||
47 | // } |