Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (20 sloc) 0.632 kb
<?php
require_once('./eval_conf.php');
require_once('./functions.php');
// Load the metric caching code
//$debug = 1;
retrieve_metrics_cache();
if ( isset($_GET['term']) && $_GET['term'] != "" ) {
$query = $_GET['term'];
// Now let's look through metrics.
foreach ( $index_array['metrics'] as $metric_name => $hosts ) {
if ( preg_match("/$query/i", $metric_name ) ) {
foreach ( $hosts as $key => $host_name ) {
$cluster_name = $index_array['cluster'][$host_name];
$results[] = array( "value" => $cluster_name . "_|_" . $host_name . "_|_" . $metric_name);
}
}
}
}
echo json_encode($results);
?>
Jump to Line
Something went wrong with that request. Please try again.