aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..f937bcc
--- /dev/null
+++ b/index.php
@@ -0,0 +1,30 @@
1<?php
2
3include_once 'conf/common.inc.php';
4include_once 'inc/collectd.inc.php';
5require_once 'inc/html.inc.php';
6
7html_start();
8
9$h = array();
10
11# show all categorized hosts
12foreach($CONFIG['cat'] as $cat => $hosts) {
13 printf("<h1>%s</h1>\n", $cat);
14 host_summary($hosts);
15 $h = array_merge($h, $hosts);
16}
17
18# search for uncategorized hosts
19$chosts = collectd_hosts();
20$uhosts = array_diff($chosts, $h);
21
22# show all uncategorized hosts
23if ($uhosts) {
24 echo "<h1>uncategorized</h1>\n";
25 host_summary($uhosts);
26}
27
28html_end();
29
30?>