Monitoring RHEL8 in SCOM 2019 UR1

“A picture is worth a hundreds words” : News!! News!! SCOM 2019 UR1 supports RHEL 8 monitoring.

 

In this blog I will explain:

  1. How to provision a RHEL 8 box in Hyper-V?
  2. Additional configuration required before we can add the RHEL 8 box to SCOM.
  3. How to add the RHEL 8 box to SCOM?

Phase 1: RHEL 8 configuration

 

  1. Download RHEL 8 from the below site. You need to sign up first.
    https://developers.redhat.com/rhel8/
  2. Copy the ISO file to a location inside the Hyper-V box.

  3. Create a Virtual Machine (VM) using the ISO.

  4. Now it is time to install RHEL 8.

    ** Make sure if you got an IP assigned. In my case I am using DHCP.
    ** Also change the host name as per your DNS name.

    ** I am using GUI version

    ** Wait for the installation to complete. It might take between 1-2 hours.

    ** Once the server it rebooted. Do the initial configuration.

  5. Configure firewall to allow communication on port 1270. In my case, I have disabled the firewall by running the below command. ** DO NOT do that in PROD boxes. Configure the firewall rules instead.
    service firewalld stop

Phase 2: SCOM configuration

 

  1. Create a Host (A) record and update corresponding PTR in DNS for the RHEL 8 box. In my case, I created the same in my domain nfs.lab
  2. Once the DNS record is created, do a nslookup for the box RHEL 8 from the SCOM Management Server and verify we are good.
  3. Make sure you have SCOM 2019 UR1 applied.

  4. Download the SCOM 2019 UR1 UNIX/LINUX Management Pack from the below link.

    https://www.microsoft.com/en-us/download/details.aspx?id=58208

  5. Import the below Management Packs. Make sure the version is 10.19.1082.0. In case some of the MPs are already imported ignore them.

    • Microsoft.Unix.Library.mp
    • Microsoft.Linux.Library.mp
    • Microsoft.Linux.Universal.Library.mp
    • Microsoft.Linux.Universal.Monitoring.mp
    • Microsoft.Linux.UniversalR.1.mpb (Discover/Monitor RPM distros)
    • Microsoft.Linux.UniversalD.1.mpb (Discover/Monitor Debian distros)
  6. Configure the sudoers file on the RHEL 8 box and the SCOM UNIX/LINUX Run As Account and Profiles. I have already explained this in my other blog.
    http://88i.5b8.mywebsitetransfer.com/how-to-configure-sudoers-file-for-scom-monitoring/

    Imp: Use the below sudoers configuration for RHEL 8 till the time we update the Wiki page.

     

    #-----------------------------------------------------------------------------------
    #Example user configuration for Operations Manager agent
    #Example assumes users named: scxmaint & scxmon
    #Replace usernames & corresponding /tmp/scx-<username> specification for your environment
    
    #General requirements
    Defaults:scxmaint !requiretty
    
    #Agent maintenance
    ##Certificate signing
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c cp /tmp/scx-scxmaint/scx.pem /etc/opt/microsoft/scx/ssl/scx.pem; rm -rf /tmp/scx-scxmaint; /opt/microsoft/scx/bin/tools/scxadmin -restart
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c cat /etc/opt/microsoft/scx/ssl/scx.pem
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c if test -f /opt/microsoft/omsagent/bin/service_control; then cp /tmp/scx-scxmaint/omsadmin.conf /etc/opt/microsoft/omsagent/scom/conf/omsadmin.conf; /opt/microsoft/omsagent/bin/service_control restart scom; fi
    
    ##Install or upgrade
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c sh /tmp/scx-scxmaint/scx-1.[5-9].[0-9]-[0-9].universal[[\:alpha\:]].[[\:digit\:]].x[6-8][4-6].sh --install --enable-opsmgr; EC=$?; cd /tmp; rm -rf /tmp/scx-scxmaint; exit $EC
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c sh /tmp/scx-scxmaint/scx-1.[5-9].[0-9]-[0-9][0-9].universal[[\:alpha\:]].[[\:digit\:]].x[6-8][4-6].sh --install --enable-opsmgr; EC=$?; cd /tmp; rm -rf /tmp/scx-scxmaint; exit $EC
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c sh /tmp/scx-scxmaint/scx-1.[5-9].[0-9]-[0-9][0-9][0-9].universal[[\:alpha\:]].[[\:digit\:]].x[6-8][4-6].sh --install --enable-opsmgr; EC=$?; cd /tmp; rm -rf /tmp/scx-scxmaint; exit $EC
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c sh /tmp/scx-scxmaint/scx-1.[5-9].[0-9]-[0-9].universal[[\:alpha\:]].[[\:digit\:]].x[6-8][4-6].sh --upgrade --enable-opsmgr; EC=$?; cd /tmp; rm -rf /tmp/scx-scxmaint; exit $EC
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c sh /tmp/scx-scxmaint/scx-1.[5-9].[0-9]-[0-9][0-9].universal[[\:alpha\:]].[[\:digit\:]].x[6-8][4-6].sh --upgrade --enable-opsmgr; EC=$?; cd /tmp; rm -rf /tmp/scx-scxmaint; exit $EC
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c sh /tmp/scx-scxmaint/scx-1.[5-9].[0-9]-[0-9][0-9][0-9].universal[[\:alpha\:]].[[\:digit\:]].x[6-8][4-6].sh --upgrade --enable-opsmgr; EC=$?; cd /tmp; rm -rf /tmp/scx-scxmaint; exit $EC
    
    ##Uninstall
    #scxmaint ALL=(root) NOPASSWD: /bin/sh -c /opt/microsoft/scx/bin/uninstall
    scxmaint ALL=(root) NOPASSWD: /bin/sh -c if test -f /opt/microsoft/omsagent/bin/omsadmin.sh; then if test "$(/opt/microsoft/omsagent/bin/omsadmin.sh -l | grep scom | wc -l)" \= "1" && test "$(/opt/microsoft/omsagent/bin/omsadmin.sh -l | wc -l)" \= "1" || test "$(/opt/microsoft/omsagent/bin/omsadmin.sh -l)" \= "No Workspace"; then /opt/microsoft/omsagent/bin/uninstall; else /opt/microsoft/omsagent/bin/omsadmin.sh -x scom; fi; else /opt/microsoft/scx/bin/uninstall; fi
    
    ##Log file monitoring
    scxmon ALL=(root) NOPASSWD: /opt/microsoft/scx/bin/scxlogfilereader -p
    
    ###Examples
    #Custom shell command monitoring example – replace <shell command> with the correct command string
    scxmon ALL=(root) NOPASSWD: /bin/sh -c echo error
    
    ##For ubuntu18
    scxmon ALL=(root) NOPASSWD: /bin/bash -c echo error
    
    #Daemon diagnostic and restart recovery tasks example (using cron)
    #scxmon ALL=(root) NOPASSWD: /bin/sh -c ps -ef | grep cron | grep -v grep
    #scxmon ALL=(root) NOPASSWD: /usr/sbin/cron &
    #End user configuration for Operations Manager agent
    #-----------------------------------------------------------------------------------

     

  7. Run the discovery wizard.

And we are all set!!

 

Hope that was helpful.

 

Thanks!!

 

Explore, Learn, Share, Repeat!

This entry was posted in SCOM on by .