Skip to content

Commit

Permalink
Linux Monitoring Extensions Code Review Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayAppd19 committed Oct 24, 2017
1 parent 05bdf24 commit 49b6818
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/main/java/com/appdynamics/extensions/linux/LinuxMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,24 @@ public void run() {

public TaskOutput execute(Map<String, String> taskArgs, TaskExecutionContext taskExecutionContext)
throws TaskExecutionException {

if (taskArgs != null) {
if (!initialized) {
configure(taskArgs);
}
logger.info("Starting the Linux Monitoring task");
if (logger.isDebugEnabled()) {
logger.debug("The arguments after appending the default values are " + taskArgs);
String msg = "Using Monitor Version [" + getImplementationVersion() + "]";
logger.info(msg);
try{
if (taskArgs != null) {
if (!initialized) {
configure(taskArgs);
}
logger.info("Starting the Linux Monitoring task");
if (logger.isDebugEnabled()) {
logger.debug("The arguments after appending the default values are " + taskArgs);
}
configuration.executeTask();
return new TaskOutput("Linux Monitor Metric Upload Complete");
}
configuration.executeTask();
return new TaskOutput("Linux Monitor Metric Upload Complete");
}catch(Exception e) {
logger.error("Failed to execute the Linux monitoring task", e);
}
throw new TaskExecutionException(logVersion() + "Linux monitoring task completed with failures.");

}

private String logVersion() {
Expand Down

0 comments on commit 49b6818

Please sign in to comment.