projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5' into collectd-5.6
[collectd.git]
/
contrib
/
collection3
/
lib
/
Collectd
/
Graph
/
Common.pm
diff --git
a/contrib/collection3/lib/Collectd/Graph/Common.pm
b/contrib/collection3/lib/Collectd/Graph/Common.pm
index
cc7e141
..
31c530f
100644
(file)
--- 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 $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}))
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)
}
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);
@ret = grep { _filter_ident ($ident, $_) == 0 } (@$all_files);