AnsweredAssumed Answered

Monitoring EM Performance through EPA Plugin

Question asked by madhu1512 on Nov 19, 2010
Latest reply on Mar 30, 2012 by aleandrade
Hi,


We are trying to monitor all EM performance through single EM,Where i am trying to write Perl script and projecting through EPAgent.

When i am executing with normal print i am getting the output. But projecting output with Printmetric.pm the metrics are not showing in the EM.

Please check my code and suggest me necessary changes to get metrics reported to EM.


use FindBin;
use lib ("$FindBin::Bin", "$FindBin::Bin/../lib/perl");
use Wily::PrintMetric;



@array =("EM Performance|JVM.TotalMemory",
"EM Performance|JVM.FreeMemory",
"EM Performance|JVM.GCTimePercent",
"EM Performance|Workstation.NumberOfWorkstations",
"EM Performance|Harvest.HarvestDuration",
"EM Performance|Smartstor.Duration",
"EM Performance|Agent.ConnectionThrottleCount",
"EM Performance|Agent.NumberOfMetrics",
"EM Performance|Agent.NumberOfAgents",
"EM Performance|Agent.MetricDataPending",
"EM Performance|Agent.MetricDataRate",
"EM Performance|Server.NumberOfMetricGroups",
"EM Performance|Transactions.Num.Inserts.Per.Interval",
"EM Performance|Transactions.Num.Dropped.Per.Interval",
"EM Performance|Transactions.Num.Queries.Per.Interva",
"EM Performance|Transactions.Query.Time.Per.Interval",
"EM Performance|Transactions.Index.Insertion.Time.Per.Interval",
"EM Performance|Transactions.Data.Insertion.Time.Per.Interval",
"EM Performance|Transactions.Num.Traces",
"EM Performance|Transactions.TT.Queue.Size",
"EM Performance|MetricDataManager.QueryRate");

my $data= '/opt/introscope81/emtstpm5101/perflog.txt';



open (F , $data)|| die ("Could not open $file!");

$pos = -2;

while($char ne "\n")
{
seek F, $pos, 2;
read F, $char, 1;
$pos--;
}

$final = <F>;
print "Last line is: $final\n";


my @values = split(',', $final);



for ($i=0; $i<=21; $i++)
{
Wily::PrintMetric::printMetric( type => 'IntCounter',
resource => 'EM',
name => $array[$i];
value => int ($Values[$i+1]),
);
}
exit 0;



introscope.epagent.plugins.stateless.names=EM

introscope.epagent.stateless.EM.command=perl EM.pl
introscope.epagent.stateless.EM.delayInSeconds=60

Thanks

Outcomes