X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=contrib%2Fcollection3%2Flib%2FCollectd%2FGraph%2FCommon.pm;fp=contrib%2Fcollection3%2Flib%2FCollectd%2FGraph%2FCommon.pm;h=31c530f466987f403b76db500a117a9cb1b5a085;hp=cc7e141f8828380fb8978c796faf4df46f4c6653;hb=2a21d97cffadd2d329a48693267eb0bda59bd35e;hpb=3443ff673c02123226bc3838ee4d9ed4831ff717 diff --git a/contrib/collection3/lib/Collectd/Graph/Common.pm b/contrib/collection3/lib/Collectd/Graph/Common.pm index cc7e141f..31c530f4 100644 --- a/contrib/collection3/lib/Collectd/Graph/Common.pm +++ b/contrib/collection3/lib/Collectd/Graph/Common.pm @@ -487,6 +487,8 @@ sub get_files_by_ident my $ident = shift; my $all_files; my @ret = (); + my $temp; + my $hosts; my $cache_key = ident_to_string ($ident); if (defined ($Cache->{'get_files_by_ident'}{$cache_key})) @@ -496,7 +498,20 @@ sub get_files_by_ident return ($ret) } - $all_files = _get_all_files (); + if ($ident->{'hostname'}) + { + $all_files = []; + $hosts = $ident->{'hostname'}; + foreach (@$hosts) + { + $temp = get_files_for_host ($_); + push (@$all_files, @$temp); + } + } + else + { + $all_files = _get_all_files (); + } @ret = grep { _filter_ident ($ident, $_) == 0 } (@$all_files);