Martin Margo wrote:
Dear Mr. Massie
Sir, I am really sorry to bug you again this time.
But I have finally sorted out all kind of problems
and have finally getting closer to the problem.
I execute the /sbin/gmetad script and viewed the
/logs/gmetad.log file and in there it said
"User of unitialized value in hash element at ../sbin/gmetad line 108.
And the source code for that line is
elsif ( $el eq "METRIC" )
{
my $metricname = $attributes{'NAME'};
%{$metric_data{$clustername}{$hostname}{$metricname}}=%atributes; <---
}
Do you know how to fix this ? If I commented out the block of
else if , I will get the XML header. So it has to be this
block of commands. Once again, I am really sorry to bother you.
If you copied and pasted that (verbatim) from the source, I see the
problem. (if not, you'll just have to debug it yourself by adding some
print statements - grab your local Perl monkey, buy them some caffeine and
let them loose on it... )
> %{$metric_data{$clustername}{$hostname}{$metricname}}=%atributes; <---
^^^^^^^^^^^
"%attributes" is misspelled (it's missing a 't').
Didn't even have to crack open the camel book for this one! :)