0

Our Java-program talks to IBM MQ using IBM-provided com.ibm.mq.allclient JAR. As documented by IBM, log-messages generated from within the JAR are written out into mqjms.log in the current directory.

The above link explains, how the location -- and/or the filename -- can be changed, but that's all the flexibility there is documented...

Our own code uses log4j with appenders configured for both local files and for the corporate Splunk -- using Splunk's own JARs.

Is it possible to configure IBM MQ client JAR to feed log-entries directly into Splunk as well? Splunk document, how to feed their server from several Java logging frameworks -- is IBM MQ using any of them? Can it be made to?

Update: I'd rather not feed Splunk by way of printing -- be it into a file watched by Splunk Forwarding Agent -- or other means. Because the printed log-entry loses some information. And because multi-line entries (such as those with Java-exceptions) will generate a logging event for each line.

Mikhail T.
  • 2,338
  • 1
  • 24
  • 55
  • Could you install the splunk client forwarder to just tail that file locally? – Chopper3 Nov 17 '21 at 09:59
  • Besides pointing to a specific file the only other option you have is to tm point to System.err or System.out, could you use something like [this](https://edivad.wordpress.com/2007/02/26/systemout-and-systemerr-over-log4j/amp/) to have System.err go to log4j which is then configured to send to splunk? – JoshMc Nov 17 '21 at 10:08
  • Thanks for the suggestions -- I updated the question with the explanation, why I'd rather not go through text-file. – Mikhail T. Nov 17 '21 at 21:28
  • Did you find a solution? – JoshMc Jul 08 '22 at 00:38
  • @MikhailT. My suggestion was not the go through a file. My suggestion was to configure MQ to send messages to System.err or System.out and then per the link I provided redirect System.err or System.out to log4j configured like you mentioned with appenders configured for Splunk. This would not involve a text file. – JoshMc Dec 20 '22 at 04:57

0 Answers0