Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As this output will show in your script results before any of the data from the agent output it can cause issues with monitors.
To remove this data do the following:
 
 
Code Block
1. Edit the agentcmd.jcnf file in the scripts directory of the monitoring station:

...

 
Code Block

In the following section:
[jvm.additional.args]
-d64

Add:
-Dlog4j.configuration=file:///usr/local/uptime/scripts/log4j.properties

So should now see:
[jvm.additional.args]
-d64
-Dlog4j.configuration=file:///usr/local/uptime/scripts/log4j.properties
 
2. Create the log4j.properties file in the scripts directory and add the following code to it.
log4j.rootLogger=WARN, THIRDPARTY

#console logger
 log4j.appender.CONSOLE=org.apache.log4j.RollingFileAppender
 log4j.appender.CONSOLE.MaxFileSize=10MB
 log4j.appender.CONSOLE.MaxBackupIndex=0
 log4j.appender.CONSOLE.File=logs/uptime_scripts.log
 log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
 log4j.appender.CONSOLE.layout.ConversionPattern=%d | %p | %X{context} | %t | %c | %m%n

  
 #third party code logger - thirdparty.log
 log4j.appender.THIRDPARTY=org.apache.log4j.RollingFileAppender
 log4j.appender.THIRDPARTY.MaxFileSize=10MB
 log4j.appender.THIRDPARTY.MaxBackupIndex=0
 log4j.appender.THIRDPARTY.File=logs/thirdparty.log
 log4j.appender.THIRDPARTY.layout=org.apache.log4j.PatternLayout
 log4j.appender.THIRDPARTY.layout.ConversionPattern=%d | %p | %X{context} | %t | %c | %m%n

...