Cloud Pak for Integration

 View Only
  • 1.  CP4I version 2022.2.1-2 : OpenShift Elasticsearch operator not exporting QueueManager logs

    Posted Wed June 28, 2023 01:17 PM

    Hi,

    Am using RedHat OpenShift Cluster Platform 4.10 . I have installed 'OpenShift Elasticsearch' operator from RedHat Market Hub and followed IBM documentation IBM_Doc and also installed 'Red Hat OpenShift Logging' operator. 

    Problem statement: Kibana is able show the log for MQ POD. But I dont see log of  /var/mqm/errors/AMQERR01.json or AMQERR01.LOG . Can you please suggest what needs to be done to get QM logs?.



    ------------------------------
    Vasantha Nadiga Siddappa
    ------------------------------


  • 2.  RE: CP4I version 2022.2.1-2 : OpenShift Elasticsearch operator not exporting QueueManager logs

    IBM Champion
    Posted Thu June 29, 2023 03:23 AM

    You need to configure the qm.ini DiagnosticMessages stanza

    https://www.ibm.com/docs/en/ibm-mq/9.1?topic=stanzas-diagnostic-message-services#q018795___qmdiagsyslog

    Look for the 'Service=Syslog' statement.

    If you can set that up in your container then the MQ messages that go to the AMQERR01.LOG will also be sent (in JSON format) to the syslog which kibana/elasticsearch should be collecting.

    I don't have a OpenShift cluster handy, so I can't explain how to configure qm.ini inside your container. Sorry.

    Regards,



    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019-22
    ------------------------------



  • 3.  RE: CP4I version 2022.2.1-2 : OpenShift Elasticsearch operator not exporting QueueManager logs

    Posted Thu June 29, 2023 06:05 AM

    If you're using the MQ-provided queue manager image, or another image based off our sample, then the contents of the AMQERRnn.json log is forwarded by default to the container log (stdout/stderr for the container).  This means that tools like OpenShift Logging can easily pick up the logs with no additional configuration needed at all.  The AMQERRnn.LOG file contains basically the same information, and the JSON is intended as a more structured replacement.



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



  • 4.  RE: CP4I version 2022.2.1-2 : OpenShift Elasticsearch operator not exporting QueueManager logs

    Posted Thu June 29, 2023 10:54 AM

    Thanks. Am using IBM MQ Operator, so this operator is taking care for using right image provided by IBM and deploy in RedHat OpenShift Cluster Platform.  

    Currently Kibana shows MQ POD container logs, but not show the actual logs of Queue Manager. Can you please help me to understand how Collector POD's extract the logs from MQ POD please?.



    ------------------------------
    Vasantha Nadiga Siddappa
    ------------------------------



  • 5.  RE: CP4I version 2022.2.1-2 : OpenShift Elasticsearch operator not exporting QueueManager logs

    Posted Thu June 29, 2023 11:03 AM

    By default the container uses a log format of "basic", which shows a one-line message for each log entry in AMQERRnn.LOG.  This one line contains the timestamp, the message text, and any message inserts.  You can se the container to use a log format of "json", which shows the contents of AMQERR01.json instead.  The JSON output is very similar, but in JSON form.

    The full message text from AMQERRnn.LOG, including the "Next Action" and other descriptive text is not forwarded.  This is so that the message is kept to one line, primarily to make log ingestion easier.  You can look up the descriptive text in the IBM MQ documentation.

    The full text will always be included in any must-gather output.  If you really want to get the full AMQERRnn.LOG text into ElasticSearch, you will need to add your own log forwarding agent.  However the vast majority of people use the one-line content, which has all the unique and necessary information.



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



  • 6.  RE: CP4I version 2022.2.1-2 : OpenShift Elasticsearch operator not exporting QueueManager logs

    Posted Fri June 30, 2023 11:43 AM
    Edited by Vasantha Nadiga Siddappa Fri June 30, 2023 11:44 AM

    Hi Arthur,

    Thanks.

    If stats are enabled at Queue Manager/Queue level, can this stats be collected and viewed over Kibana ?.  for e.g., queue depth High/Low events.



    ------------------------------
    Vasantha Nadiga Siddappa
    ------------------------------



  • 7.  RE: CP4I version 2022.2.1-2 : OpenShift Elasticsearch operator not exporting QueueManager logs

    Posted Tue July 04, 2023 04:29 AM

    Hi,

    It would be possible, but we don't have any integration out-of-the-box.  ElasticSearch ingests and indexes text data (usually logs), but it can be used to handle numeric data, if you submit it as structured text (e.g. JSON).  You can then use Kibana to view the text data, or graphs generated from it (e.g. counts of certain messages).  I don't think the queue manager will add entries to its error log for events, so you would need a program which was subscribed to event messages, and turned them into text which was sent to ElasticSearch.

    We often see this use case tackled via purpose-built metrics (numeric) data instead.  OpenShift Monitoring does this using Prometheus.  The MQ container code generates Prometheus metrics based on MQ statistics.  The official container code doesn't currently support queue-level metrics, but there are samples available here which might be of interest to you: https://github.com/ibm-messaging/mq-metric-samples



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