AIOps: Monitoring and Observability - Group home

Monitoring z/OS Connect in z/OS Container Platform with IBM Z OMEGAMON AI for JVM

  

Overview

IBM z/OS Container Platform (zOSCP) version 1.1.0 was released on March 5th, 2024. It provides industry-standard cloud technologies that enable z/OS UNIX applications to run in container images. The container runtime is compliant with Open Container Initiative (OCI) specifications, which can be used to build and run images as containers natively on z/OS.

Running z/OS Connect in a z/OS Container

One of the first applications readily available to run as a container on this new platform is z/OS Connect. Customers who are entitled to z/OS Connect Unlimited Edition are automatically entitled to the z/OS Connect OCI images on IBM Cloud Registry. You will find a tutorial in the z/OS Connect documentation describing how to deploy a z/OS Connect image to a z/OSCP container using Podman, and store it in your local registry.

Once you have a z/OS Connect image in your local registry, you can easily add IBM Z OMEGAMON for JVM monitoring by building an image with z/OS Connect and the OMEGAMON for JVM agents and configuration files.

You can build your OMEGAMON for JVM image using the files in an ITM Runtime Environment (RTE) USS directory.  These files are located in the kan/bin/IBM subdirectory of the RTE home directory. You will need to create z/OS Connect configuration snippet files containing the config elements needed for OMEGAMON for JVM agent functionality. A Containerfile will need to be created containing instructions for building the image contents.  Follow these steps:

1.     1. Create a file in the kan/bin/IBM  directory called jvm.options. This must be an EBCDIC file. Edit the file (using ISPF option 3.17 for example), and add the following statements:

-javaagent:/usr/lpp/kan/kjj.jar           

-agentpath:/usr/lpp/kan/libkjjagent_64.so 

-Xbootclasspath/a:/usr/lpp/kan/kjjboot.jar

2.    Create a file in the kan/bin/IBM   directory called omjvm.xml. Edit this file in ASCII and add the following contents:

      <?xml version="1.0" encoding="UTF-8"?>

<server description="z/OS Connect with OMEGAMON for JVM">

         <featureManager>

           <feature>omegamon-3:omegamonRequestMonitor-3.0</feature>

           <feature>zosconnect:monitoring-1.0</feature>

         </featureManager>

         <omegamon-3_omegamonRequestMonitor-3.0 id="omegamonInterceptor-3.0" />

         <zosconnect_zosConnectInterceptors id="list1"

                interceptorRef="omegamonInterceptor-3.0" />

         <zosconnect_monitoring apiProviderInterceptorsRef="list1"/>

</server>

4.5.     Edit the omegamon-3.properties file as an EBCDIC file to read as follow:

com.ibm.websphere.productId=omegamonRequestMonitor-3.0

com.ibm.websphere.productInstall=/usr/lpp/kan        

6. If you want to monitor z/OS Connect API calls, you will need to edit the kjj_logstream.xml file to automatically create the log streams used by OMEGAMON. It is an ASCII file. Change the defaults lines to read:

<defaults name="$SMFID.$CID.$JOBNAME" ehlq="" lssize="10000" stgsize="10000" retpd="1" define="true"/>       

6.    7. Create a file called Containerfile in your kan/bin/IBM/ directory. This is an ASCII file and must be tagged as such.

touch Containerfile

chtag -tc ISO8859-1 Containerfile

7.    8. Edit the Containerfile (in ASCII) , and add the following contents:

##############################################                                                                
# IBM Z OMEGAMON AI for JVM 6.1.0            #                                                                
##############################################                                                                
FROM <your_registry>/ibm-zcon-server:3.0.80                                                               
                                                                                                              
COPY --chmod=644 ./jvm.options /opt/ibm/wlp/usr/servers/defaultServer/jvm.options                             
                                                                                                              
COPY --chmod=644 ./omegamon-3.properties /opt/ibm/wlp/etc/extensions/omegamon-3.properties                    
                                                                                                              
COPY --chmod=755 ./ /usr/lpp/kan                                                                              
                                                                                                              
COPY --chmod=755 ./omjvm.xml /config/configDropins/overrides/omjvm.xml                                        
                                                                                                              
RUN mkdir -p /usr/lpp/kan/lib/features                                                                        
                                                                                                              
COPY --chmod=755 ./com.ibm.omegamon.kjj.interceptor_3.0.jar /usr/lpp/kan/lib                                  
                                                                                                              
COPY --chmod=755 ./com.ibm.omegamon.kjj.interceptor_3.0.mf  /usr/lpp/kan/lib/features                         
                                                                                                              
COPY --chmod=664 ./omegamon-3.properties /usr/lpp/IBM/zosconnect/v3r0/wlp/etc/extensions/omegamon-3.properties
                                                                                                              
ENV JVM_OPTIONS="-Xoptionsfile=/opt/ibm/wlp/usr/servers/defaultServer/jvm.options"

This Containerfile will create an image layer based on the z/OS Connect image with OMEGAMON for JVM configured.

You can build this image with podman command, such as

podman build -f Containerfile -t your-registry/omegamon-for-jvm:6.1.0

Use this image to deploy your APIs with, and they will automatically be monitored by OMEGAMON for JVM.

#OMEGAMON #zos-connect #zOSCP