diff --git a/contrib/collection3/lib/Collectd/Graph/Type.pm b/contrib/collection3/lib/Collectd/Graph/Type.pm
index 60097e5c43653c8e2cd3aedabceb8bc877236dfe..1fb60afeecdd31a36b2eb4f1faefcaaad08ba149 100644 (file)
my $plugin_instance = $ident->{'plugin_instance'};
my $type = $ident->{'type'};
my $type_instance = $ident->{'type_instance'};
my $plugin_instance = $ident->{'plugin_instance'};
my $type = $ident->{'type'};
my $type_instance = $ident->{'type_instance'};
+ my $instance;
+
+ if (defined $type_instance)
+ {
+ $instance = $type_instance;
+ }
+ elsif (defined $plugin_instance)
+ {
+ $instance = $plugin_instance;
+ }
+ else
+ {
+ $instance = 'no instance';
+ }
if (!defined $plugin_instance)
{
if (!defined $plugin_instance)
{
$title =~ s#{plugin_instance}#$plugin_instance#g;
$title =~ s#{type}#$type#g;
$title =~ s#{type_instance}#$type_instance#g;
$title =~ s#{plugin_instance}#$plugin_instance#g;
$title =~ s#{type}#$type#g;
$title =~ s#{type_instance}#$type_instance#g;
+ $title =~ s#{instance}#$instance#g;
return ($title);
}
return ($title);
}