X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fphp-collection%2Fgraph.php;h=b9fefa6ad479f135e79f7da19cc2cc1d2ac80308;hb=a05485da75ec42a9aa38354e0d0364885b1ecad9;hp=17749e06926fd269da3c3b88c7a1f51582e08784;hpb=177f4357d29d8a488686fd92da3acd5ef2d9b10b;p=collectd.git diff --git a/contrib/php-collection/graph.php b/contrib/php-collection/graph.php index 17749e06..b9fefa6a 100644 --- a/contrib/php-collection/graph.php +++ b/contrib/php-collection/graph.php @@ -164,7 +164,7 @@ $logscale = (boolean)read_var('logarithmic', $_GET, false); $tinylegend = (boolean)read_var('tinylegend', $_GET, false); // Check that at least 1 RRD exists for the specified request -$all_tinst = collectd_list_tinsts($host, $plugin, $pinst, $type); +$all_tinst = collectd_list_types($host, $plugin, $pinst, $type); if (count($all_tinst) == 0) return error404($graph_identifier, "No rrd file found for graphing"); @@ -182,7 +182,7 @@ if ($tinylegend) $opts['tinylegend'] = 1; $rrd_cmd = false; -if (isset($MetaGraphDefs[$type])) { +if ((is_null($tinst) || $tinst == '@merge') && isset($MetaGraphDefs[$type])) { $identifiers = array(); foreach ($all_tinst as &$atinst) $identifiers[] = collectd_identifier($host, $plugin, is_null($pinst) ? '' : $pinst, $type, $atinst);