“A picture is worth a hundreds words” : News!! News!! SCOM 2019 UR1 supports RHEL 8 monitoring.
In this blog I will explain:
- How to provision a RHEL 8 box in Hyper-V?
- Additional configuration required before we can add the RHEL 8 box to SCOM.
- How to add the RHEL 8 box to SCOM?
Phase 1: RHEL 8 configuration
- Download RHEL 8 from the below site. You need to sign up first.
https://developers.redhat.com/rhel8/ -
Copy the ISO file to a location inside the Hyper-V box.
-
Create a Virtual Machine (VM) using the ISO.
-
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.
- 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
- 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
- Once the DNS record is created, do a nslookup for the box RHEL 8 from the SCOM Management Server and verify we are good.
-
Make sure you have SCOM 2019 UR1 applied.
-
Download the SCOM 2019 UR1 UNIX/LINUX Management Pack from the below link.
https://www.microsoft.com/en-us/download/details.aspx?id=58208
-
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)
-
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 #-----------------------------------------------------------------------------------
-
Run the discovery wizard.
And we are all set!!
Hope that was helpful.
Thanks!!
Explore, Learn, Share, Repeat!