Rev 80 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | <?php |
2 | |||
3 | /* |
||
4 | * VNag - Nagios Framework for PHP |
||
5 | * Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com> |
||
6 | * Licensed under the terms of the Apache 2.0 license |
||
7 | * |
||
8 | * Revision 2018-07-19 |
||
9 | */ |
||
10 | |||
11 | // This file (index.php) is intended to be called by your browser. |
||
84 | daniel-mar | 12 | // If you want to access via Nagios/Icinga or CLI, call "bin/ipfm.phar" instead. |
2 | daniel-mar | 13 | |
14 | declare(ticks=1); |
||
15 | |||
16 | define('USE_DYGRAPH', false); // Slow! |
||
17 | define('ALLOW_HTTP_PARAMTER_OVERWRITE', false); // true: Allow the user to set their own ?w=...&c=... etc. |
||
18 | |||
19 | if (!ALLOW_HTTP_PARAMTER_OVERWRITE) { |
||
20 | $_REQUEST['L'] = '/var/log/ipfm'; |
||
84 | daniel-mar | 21 | $_REQUEST['l'] = '10TB'; |
2 | daniel-mar | 22 | $_REQUEST['w'] = '6TB,8TB'; |
23 | $_REQUEST['c'] = '8TB,15TB'; |
||
24 | } |
||
25 | |||
26 | ?><!DOCTYPE HTML> |
||
27 | |||
28 | <html> |
||
29 | |||
30 | <head> |
||
31 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
||
32 | <meta http-equiv="refresh" content="300; URL=<?php echo isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; ?>"> |
||
33 | <title>Traffic monitor</title> |
||
34 | <?php if (USE_DYGRAPH) { ?> |
||
35 | <!--[if IE]> |
||
84 | daniel-mar | 36 | <script type="text/javascript" src="dygraph/excanvas.js"></script> |
2 | daniel-mar | 37 | <![endif]--> |
38 | <script type="text/javascript" src="dygraph/dygraph-combined.js"></script> |
||
39 | <?php } ?> |
||
40 | <script type="text/javascript" src="https://www.google.com/jsapi"></script> |
||
41 | <meta name="robots" content="noindex"> |
||
42 | </head> |
||
43 | |||
44 | <body> |
||
45 | |||
46 | <h1>Traffic monitor</h1> |
||
47 | |||
48 | <?php |
||
49 | |||
84 | daniel-mar | 50 | require_once __DIR__ . '/../../src/framework/vnag_framework.inc.php'; |
51 | require_once __DIR__ . '/../../src/plugins/ipfm/IpFlowMonitorCheck.class.php'; |
||
2 | daniel-mar | 52 | |
53 | $job = new IpFlowMonitorCheck(); |
||
54 | $job->http_visual_output = VNag::OUTPUT_EXCEPTION; |
||
55 | $job->http_invisible_output = VNag::OUTPUT_ALWAYS; |
||
56 | $job->run(); |
||
57 | unset($job); |
||
58 | |||
59 | ?> |
||
60 | </body> |
||
61 | |||
62 | </html> |