X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=www%2Fprintbadpcus.php;h=500be1fecb13e67f38a922c8eee4f26486bdf5c4;hb=0fabfc8dbe8f1f2c0d12397e1bc8c6ed686fb5ed;hp=fb86fa3f8ad6768d82526c9d2380736485ef3e22;hpb=ba6cc9b30b0741e10033a769202047ddeb96f6d1;p=monitor.git
diff --git a/www/printbadpcus.php b/www/printbadpcus.php
index fb86fa3..500be1f 100644
--- a/www/printbadpcus.php
+++ b/www/printbadpcus.php
@@ -1,9 +1,22 @@
";
#print print_r(array_key_exists('portstatus', $pcu)) . "
";
- if ( is_array($pcu) && array_key_exists('portstatus', $pcu) )
+ if ( is_array($pcu) && array_key_exists('portstatus', $pcu) && count(array_keys($pcu['portstatus'])) > 0 )
{
$portstat = $pcu['portstatus'];
#foreach ( array('22', '23', '80', '443') $portstat as $port => $state)
- foreach ( array('22', '23', '80', '443') as $port)
+ foreach ( array('22', '23', '80', '443', '9100', '16992') as $port)
{
$state = $portstat[$port];
switch ($state)
@@ -83,6 +96,19 @@ function DNS_to_color($dns)
}
return 'white';
}
+function reboot_to_str($reboot)
+{
+ $ret = $reboot;
+ switch ($reboot)
+ {
+ case "0":
+ $ret = "OK";
+ break;
+ default:
+ break;
+ }
+ return $ret;
+}
function reboot_to_color($reboot)
{
@@ -121,7 +147,7 @@ function get_category_link($category,$header)
return "$header";
}
-include 'soltesz.php';
+include 'database.php';
$p = new Pickle();
$findbad = $p->load("findbadpcus");
$findbadpcus = array_keys($findbad['nodes']);
@@ -147,22 +173,16 @@ foreach ( $findbadpcus as $pcu_id )
$total = count($pculist);
-## Sort the pculist
-
-#$pcu_ids = array_map('get_pcuid', $pculist);
-#array_multisort($pcu_ids, SORT_ASC, SORT_NUMERIC, $pculist);
-#$dns_ids = array_map('get_dns', $pculist);
-#array_multisort($dns_ids, SORT_ASC, SORT_STRING, $pculist);
-
-#$dry_ids = array_map('get_dryrun', $pculist);
-#array_multisort($dry_ids, SORT_ASC, SORT_STRING, $pculist);
if ( $_GET['category'] )
{
$category = $_GET['category'];
if ( $category == "node_ids" )
{
$newfunc = create_function('$pcu', 'return count($pcu[\'' . $category . '\']);');
+ } else if ( $category == "login_base" )
+ {
+ $newfunc = create_function('$pcu', 'return $pcu[\'plcsite\'][\'' . $category . '\'];');
} else {
$newfunc = create_function('$pcu', 'return $pcu[\'' . $category . '\'];');
}
@@ -175,13 +195,13 @@ if ( $_GET['category'] )
}
}
-if ( $_GET['auth'] )
+if ( $_REQUEST['id'] )
{
- $auth = True;
-} else {
- $auth = False;
+ $id = $_REQUEST['id'];
+} else{
+ $id = "all";
}
-
+#print print_r($_SERVER) . "
";
//array_multisort($protocols, SORT_ASC, SORT_STRING, $pculist);
?>
@@ -190,45 +210,123 @@ if ( $_GET['auth'] )
-Total PCUs : = $total ?>
-
-
- Count |
- = get_category_link("pcu_id", "PCU ID") ?> |
- = get_category_link("hostname", "Hostname") ?> |
- = get_category_link("complete_entry", "Incomplete Fields") ?> |
- = get_category_link("dnsmatch", "DNS Status") ?> |
- = get_category_link("portstatus", "Port Status") ?> |
- = get_category_link("reboot", "Dry Run Results") ?> |
- = get_category_link("model", "Model") ?> |
- = get_category_link("node_ids", "Nodes") ?> |
-
- Username |
- Password |
- Notes |
-
+
+ Total PCUs : = $total ?>
+
+
+ Count |
+ = get_category_link("pcu_id", "PCU ID") ?> |
+ = get_category_link("login_base", "Site") ?> |
+ = get_category_link("hostname", "PCU Name") ?> |
+ = get_category_link("complete_entry", "Incomplete Fields") ?> |
+ = get_category_link("dnsmatch", "DNS Status") ?> |
+ = get_category_link("portstatus", "Port Status") ?> |
+ = get_category_link("reboot", "Test Results") ?> |
+ = get_category_link("model", "Model") ?> |
+ = get_category_link("node_ids", "Nodes") ?> |
+
+
+
+
+
+ = $count ?> |
+ '>= $pcu['pcu_id'] ?> |
+ = pcu_site($pcu) ?> |
+ = pcu_name($pcu) ?> |
+ = pcu_entry($pcu) ?> |
+ '>= $pcu['dnsmatch'] ?> |
+ = format_ports($pcu) ?> |
+ '>= reboot_to_str($pcu['reboot']) ?> |
+ = $pcu['model'] ?> |
+ = count( $pcu['node_ids'] ) ?> |
+
+
+
+
+
+
+ Reachable Nodes: = $reachable_nodes ?>
+
+
+
+ = get_category_link("pcu_id", "PCU ID") ?> |
+ = get_category_link("login_base", "Site") ?> |
+ = get_category_link("hostname", "PCU Name") ?> |
+ = get_category_link("complete_entry", "Incomplete Fields") ?> |
+ = get_category_link("dnsmatch", "DNS Status") ?> |
+ = get_category_link("portstatus", "Port Status") ?> |
+ = get_category_link("reboot", "Test Results") ?> |
+ = get_category_link("model", "Model") ?> |
+ = get_category_link("node_ids", "Nodes") ?> |
+
+
+
+
+
+
+ '>= $pcu['pcu_id'] ?> |
+ = pcu_site($pcu) ?> |
+ = pcu_name($pcu) ?> |
+ = pcu_entry($pcu) ?> |
+ '>= $pcu['dnsmatch'] ?> |
+ = format_ports($pcu) ?> |
+ '>= reboot_to_str($pcu['reboot']) ?> |
+ = $pcu['model'] ?> |
+ = count( $pcu['node_ids'] ) ?> |
+
+
+
+
+
+
+ Legend for 'DNS Status' |
+
+ DNS-OK |
+ This indicates that the DNS name and registered IP address match. |
-
-
-
- = $count ?> |
- '>= $pcu['pcu_id'] ?> |
- = pcu_name($pcu) ?> |
- = pcu_entry($pcu) ?> |
- '>= $pcu['dnsmatch'] ?> |
- = format_ports($pcu) ?> |
- '>= $pcu['reboot'] ?> |
- = $pcu['model'] ?> |
- = count( $pcu['node_ids'] ) ?> |
-
- = ( $pcu['username'] ? $pcu['username'] : " " ) ?> |
- = $pcu['password'] ?> |
- = $pcu['notes'] ?> |
-
+
DNS-MISMATCH |
+ Sometimes, the registered IP and DNS IP address do not match. In these cases it is not clear which is correct,
+ so an error is flagged. |
+
+ DNS-NOENTRY |
+ While a hostname is provided in the registration, the hostname is not actually registered in DNS. |
+
+ NOHOSTNAME |
+ While we prefer that a hostname be registered, it is not
+ strictly required, since simply the IP address, if it is static, is enough to access the PCU. |
+
+
+ Legend for 'Port Status' |
+
+ Open |
+ Green port numbers are believed to be open. |
-
-
-
+
Filtered |
+ Gold port numbers are believed to be filtered or simply offline. |
+
+ Closed |
+ Finally, red ports appear to be closed. |
+
+
+ Legend for 'Test Results' |
+
+ OK |
+ The PCU is accessible, and short of actually rebooting the node, everything appears to work. |
+
+ NetDown |
+ The PCU is inaccessible from the PlanetLab address block 128.112.139.0/25, or it is simply offline. |
+
+ Not_Run |
+ Previous errors, such as DNS or an incomplete configuration prevented the actual test from begin performed. |
+
+ Other Errors |
+ Other errors are reported by the test that are more specific to the block encountered by the script. |
+
+
+
+