Subversion Repositories vnag

Rev

Rev 80 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 80 Rev 84
Line 7... Line 7...
7
 *
7
 *
8
 * Revision 2019-11-18
8
 * Revision 2019-11-18
9
 */
9
 */
10
 
10
 
11
// This file (index.php) is intended to be called by your browser.
11
// This file (index.php) is intended to be called by your browser.
12
// If you want to access via Nagios/Icinga or CLI, call "check_ping".
12
// If you want to access via Nagios/Icinga or CLI, call "bin/ping.phar" instead.
13
 
13
 
14
declare(ticks=1);
14
declare(ticks=1);
15
 
15
 
16
?><!DOCTYPE HTML>
16
?><!DOCTYPE HTML>
17
 
17
 
Line 32... Line 32...
32
echo '<form action="'.htmlentities($_SERVER['SCRIPT_NAME']).'" method="GET">
32
echo '<form action="'.htmlentities($_SERVER['SCRIPT_NAME']).'" method="GET">
33
Host: <input type="text" name="H" value="'.htmlentities($_REQUEST['H'] ?? '').'" size="40">
33
Host: <input type="text" name="H" value="'.htmlentities($_REQUEST['H'] ?? '').'" size="40">
34
<input type="submit" value="Check">
34
<input type="submit" value="Check">
35
</form>';
35
</form>';
36
 
36
 
37
require_once __DIR__ . '/../../framework/vnag_framework.inc.php';
37
require_once __DIR__ . '/../../src/framework/vnag_framework.inc.php';
38
require_once __DIR__ . '/PingCheck.class.php';
38
require_once __DIR__ . '/../../src/plugins/ping/PingCheck.class.php';
39
 
39
 
40
$job = new PingCheck();
40
$job = new PingCheck();
41
$job->http_visual_output    = VNag::OUTPUT_EXCEPTION;
41
$job->http_visual_output    = VNag::OUTPUT_EXCEPTION;
42
$job->http_invisible_output = VNag::OUTPUT_ALWAYS;
42
$job->http_invisible_output = VNag::OUTPUT_ALWAYS;
43
$job->run();
43
$job->run();