MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Logging options for MQ running in K8s pods.

    Posted Tue March 07, 2023 11:08 AM

    Hi MQ community, 

          We are working with running queue managers in kubernetes pods and we're wondering if it's possible to direct MQ to instead of writing the AMQERR*.LOG files to the standard /var/mqm/qmgrname/errors directory to a different location or if it's possible to pump that type of output into something like splunk. Given the dynamic nature of k8s pod we would prefer the ability to be able to peruse the logs from outside of the running pod. Has anyone been down this path?

    TIA,

    Don



    ------------------------------
    Donald Thomas
    ------------------------------


  • 2.  RE: Logging options for MQ running in K8s pods.

    Posted Wed March 08, 2023 12:48 AM

    Hi Donald,

    You can peruse the logs from outside of the running pod by creating a volume   

    Running with the default configuration and a volume "

    you can create a volume with the following command:

    docker volume create qm1data
    

    You can then run a queue manager using this volume as follows:

    docker run \
      --env LICENSE=accept \
      --env MQ_QMGR_NAME=QM1 \
      --publish 1414:1414 \
      --publish 9443:9443 \
      --detach \
      --volume qm1data:/mnt/mqm \
      ibmcom/mq
    

    The Docker image always uses /mnt/mqm for MQ data, which is correctly linked for you under /var/mqm at runtime. This is to handle problems with file permissions on some platforms.

    Please refer to the  link below:

    https://github.com/ibm-messaging/mq-docker/blob/master/README.md 

    Thank you,

    Regards,

    Prema U Lakshmanachar

    Release Effectiveness MQ Team, India Software Lab,
    IBM India Pvt. Ltd., 1st Floor, Block D,
    EGL, Bangalore – 560071



    ------------------------------
    Prema Laxmanachar
    ------------------------------



  • 3.  RE: Logging options for MQ running in K8s pods.

    Posted Wed March 08, 2023 03:13 AM

    The files are always written to disk, which isn't optional, as they are also part of the standard must-gather output.  However, the sample IBM MQ container image, and the supported images which come with the IBM MQ Operator mirror the queue manager and system error logs and the web server logs, onto the container's log (stdout).  So the container log in Kubernetes shows the messages from the container-wrapper code, plus all the MQ error log messages.



    ------------------------------
    Arthur Barr
    Container Architect, IBM MQ
    IBM
    ------------------------------



  • 4.  RE: Logging options for MQ running in K8s pods.

    Posted Wed March 08, 2023 03:51 AM

    Hi,

    In addition to what Prema stated earlier, we use a Filebeat sidecar for exporting the data from the log files residing in the shared volume. This way we can route the logs to a log management system eg. Splunk



    ------------------------------
    Hermanni Pernaa
    ------------------------------



  • 5.  RE: Logging options for MQ running in K8s pods.

    Posted Tue March 14, 2023 02:48 PM

    Sorry for the delay in acknowledging, I appreciate your time in responding. We're learning as we go along and at least for me my comfort level is not quite there yet in dealing with pods. We do have a mount point defined which we use to store our mqsc, cert files, etc. I'll look into how we might be able to pump the AMQERR* logs to central storage. Thanks again!



    ------------------------------
    Donald Thomas
    ------------------------------



  • 6.  RE: Logging options for MQ running in K8s pods.

    Posted Tue March 14, 2023 05:31 PM

    I would suggest follow what Arthur Barr @Arthur Barr suggested. This would help in long run, U do nto need extra volume mounted etc..



    ------------------------------
    om prakash
    ------------------------------