aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/index.php
blob: f937bcc21f49d12eff631784ae7045a97dc5b251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

include_once 'conf/common.inc.php';
include_once 'inc/collectd.inc.php';
require_once 'inc/html.inc.php';

html_start();

$h = array();

# show all categorized hosts
foreach($CONFIG['cat'] as $cat => $hosts) {
	printf("<h1>%s</h1>\n", $cat);
	host_summary($hosts);
	$h = array_merge($h, $hosts);
}

# search for uncategorized hosts
$chosts = collectd_hosts();
$uhosts = array_diff($chosts, $h);

# show all uncategorized hosts
if ($uhosts) {
	echo "<h1>uncategorized</h1>\n";
	host_summary($uhosts);
}

html_end();

?>