AnsweredAssumed Answered

Re: EPAgent module

Question asked by Nikhil.K on Sep 26, 2016
Latest reply on Sep 27, 2016 by Nikhil.K
Branched from an earlier discussion

Hi Davis,


I am trying your option now, but I see the blow.


I put the debug statements in the perl script, looks like it’s not able to execute the “Wily::LogReader::readLog($config);” (Debug statement 7), it’s not printing any metrics. I tried with the updated module too, any Idea on this?

#import our modules

use FindBin;

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

print "Debug: 1\n";

use Wily::Config; # Config file parser

print "Debug: 2\n";

use Wily::LogReader; # log reading


use strict;

use Getopt::Long;

print "Debug: 3\n";

$| = 1; # auto-flush STDOUT


# load the configs

print "Debug: 4\n";

my $config = Wily::Config::parseConfig("$FindBin::Bin/weblogicLogReader.cfg");

print "Debug: 5\n";

# Get and Check command line arguments here...


        'sleepTime=i'   => \($config->{'SLEEPTIME'}),

            'logfileDir=s'  => \($config->{'LOGFILEDIR'}),

            'logfile=s'     => \($config->{'LOGFILE'}),

            'subResource=s' => \($config->{'SUBRESOURCE'}),

            'n=i'           => \($config->{'NUMLOOPS'}),


print "Debug: 6\n";


# read the logfile based on these configuration options


print "Debug: 7\n";


 when i ruin the script:

(xxxxx@xxxxx)$ /usr/bin/perl
Debug: 1
Debug: 2
Debug: 3
Debug: 4
Debug: 5
Debug: 6



In the cfg file I have these are the entries what I have

LOGFILEDIR = '/logs/wily'

LOGFILE = 'test.log'





         match => '<ERROR>',

         metricType => 'IntAverage',

         metricName => 'ERROR-MessageCount_Warning',

         metricValue => '$CURRENTCOUNT'



(****@*****)$ cat  /logs/wily/test.log