Versions Compared

Key

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

...

Table of Contents

It is possible to omit this extra logging output with the following steps. 
If you find your custom monitor behaves differently after upgrading to up.time Uptime Infrastructure Monitor 7.2, you can verify if the agentcmd logging output is the culprit by running the following command.
Code Block
<uptime_dir>/scripts/agentcmd -s -p 9998 localhost ver

 

...

1. Create a agentcmd.l4j.ini file in the scripts directory of the up.time Uptime Infrastructure Monitor Monitoring Station with the following contents.

...

2. Create a log4j.properties file in the uptime directory and populate it with the following lines.
Code Block
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
3. Wherever the agentcmd command is being called from (ie. your custom monitor script), update the agentcmd line to include the --l4j-debug option.  For example, if the line looked like this:
Code Block
$NETCAT -p $port $hostname rexec $password $customscript

 

Then you will want to change it to look like this:
Code Block
$NETCAT --l4j-debug -p $port $hostname rexec $password $customscript