Splunk® User Behavior Analytics

Install and Upgrade Splunk User Behavior Analytics

This documentation does not apply to the most recent version of Splunk® User Behavior Analytics. For documentation on the most recent version, go to the latest release.

Upgrade a single node AMI or OVA installation of Splunk UBA

Perform the following steps to upgrade a single node AMI or OVA installation of Splunk UBA.

Before you begin

Before upgrading Splunk UBA on a single server, confirm you meet the Upgrade Splunk UBA prerequisites

If you have enabled the integration that sends UBA audit data to Splunk Enterprise Security (ES), preserve the associated certificate before upgrading. For more info on sending audit data to ES see, Send Splunk UBA audit events to Splunk ES. Use the following command to export the certificate:

. /opt/caspida/bin/CaspidaCommonEnv.sh
sudo keytool -exportcert -alias "splunk es" -keystore $JAVA_HOME/jre/lib/security/cacerts -rfc -file ~/splunk-es_cacert.pem

If you have enabled validation of the SSL certificate from Splunk ES, export the SSL certificate used for validating datasources from the Splunk Enterprise platform:

. /opt/caspida/bin/CaspidaCommonEnv.sh
sudo keytool -exportcert -alias "SplunkESRootCA" -keystore $JAVA_HOME/jre/lib/security/cacerts -rfc -file ~/SplunkESRootCA.pem

Single server upgrade steps

The Splunk UBA AMI and OVA images use Ubuntu as the operating system. Ensure that Splunk UBA is running before you upgrade then perform the following tasks to upgrade Splunk UBA on a single server with Ubuntu operating system.

  1. Stop all the caspida services.
    /opt/caspida/bin/Caspida stop-all
  2. Archive the previous UBA release. Replace <old-uba-version> with your version of UBA:
    sudo mkdir -p /var/vcap/release_archives
    sudo mv /opt/caspida /var/vcap/release_archives/caspida-<old-uba-version>
    sudo mkdir -p /opt/caspida && sudo chown caspida:caspida /opt/caspida
    sudo chown caspida:caspida /var/vcap/release_archives
    sudo chown caspida:caspida /var/vcap/release_archives/caspida-<old-uba-version>
  3. .
  4. Download the latest UBA branch build splunk-uba-software-upgrade-package_510.tgz and untar the UBA bits to /home/caspida directory:
    $ tar xvzf /home/caspida/splunk-uba-software-upgrade-package_510.tgz
    Splunk-UBA-Platform-5.1.0-20220721-000019.tgz
    Splunk-UBA-Platform-5.1.0-20220721-000019.tgz.md5sum
    uba-ext-pkgs-5.1.0.tgz
    uba-ext-pkgs-5.1.0.tgz.md5sum
    
  5. Untar the UBA 5.1.0 Platform build inside the /opt/caspida/ folder:
    tar xvzf /home/caspida/Splunk-UBA-Platform-5.1.0-20220721-000019.tgz -C /opt/caspida
  6. Update the list of allowed serialization classes:
    sed -i '${s/$/,com.caspida.clients.jobmanager.JobDataParams$SourceTypes,com.caspida.clients.jobmanager.JobDataParams$SourceFiles/}' /opt/caspida/conf/uba-default.properties
  7. Untar the external packages in the home folder.
    tar xvzf /home/caspida/uba-ext-pkgs-5.1.0.tgz -C /home/caspida
  8. Reinstall grub-pc package. There is an existing upgrade bug while upgrading Ubuntu that is avoided with a clean install of this package.
    sudo apt-get purge grub-pc -y
    sudo apt-get install grub-pc -y 
  9. When the prompt comes up to choose a disk, choose your BOOT disk. If you are not sure, you can select all of them which will simply install the software on all disks. WARNING: Failure to choose the correct disk will result in it not being able to boot up.
  10. Reboot the system:
    sudo reboot
  11. Upgrade the OS from Ubuntu 16.04 to Ubuntu 18.04. UBA 5.1.0 is Ubuntu 18.04 minimum.
    tmux
    sudo /opt/caspida/upgrade/utils/upgrade_ubuntu.sh /home/caspida/uba-ext-pkgs-5.1.0
  12. After Ubuntu is upgraded, reboot the system:
    sudo reboot
  13. Run the UBA upgrade script, using the path to your archived UBA from step 2. Migrate your configurations in a tmux shell just in case your SSH connection breaks.

    The path-to-prev-uba-archive might be /var/vcap/release_archives/caspida- depending on if your archived UBA version is 5.0.5 or 5.0.5.1.

    $ tmux
    $ /opt/caspida/upgrade/utils/upgrade_5.0_to_5.1.sh -p <path-to-prev-uba-archive> -e /home/caspida/uba-ext-pkgs-5.1.0.tgz
    The command installs the new Splunk UBA software, restarts Splunk UBA, and then restarts the data sources.
  14. Perform these steps to finalize the hadoop upgrade:
    1. On the UBA management node run the following commands:
      sudo -u hdfs hdfs dfsadmin -finalizeUpgrade
      sudo service hadoop-hdfs-namenode restart
    2. Restart UBA:
      /opt/caspida/bin/Caspida stop-all
      /opt/caspida/bin/Caspida start-all

If you have previously imported an output connector certificate, re-import the certificate. See, Configure the Splunk platform to receive data from the Splunk UBA output connector in the Send and Receive Data from the Splunk Platform manual.

Re-import the certificate used for sending UBA audit events to Splunk ES

If you have enabled the integration that sends UBA audit data to Splunk Enterprise Security (ES), and you preserved the associated certificate in the Before you begin step, you can now re-import that certificate. Use the following command to re-import the certificate:

. /opt/caspida/bin/CaspidaCommonEnv.sh
sudo keytool -import -alias "splunk es" -keystore $JAVA_HOME/jre/lib/security/cacerts -rfc -file ~/splunk-es_cacert.pem

Re-import the SSL certificate used for validating datasources from the Splunk Enterprise platform

If you have enabled the integration that sends UBA audit data to Splunk Enterprise Security (ES), use the following command to re-import the SSL certificate:

. /opt/caspida/bin/CaspidaCommonEnv.sh
sudo keytool -import -alias "SplunkESRootCA" -keystore $JAVA_HOME/jre/lib/security/cacerts -file ~/SplunkESRootCA.pem

For more information on SSL certificate validation, see Configure flag to enable or disable Splunk SSL certificate validation.

Apply security patches on Ubuntu

The Splunk UBA AMI and OVA images use Ubuntu as the operating system. Perform the following tasks to apply the latest security patches to your Ubuntu operating system:

Applying the security patches can take up to one hour.

  1. Log in to the Splunk UBA server as the caspida user.
  2. Run the following command to stop Splunk UBA and all services:
    /opt/caspida/bin/Caspida stop-all
  3. Run the following commands to install the latest unattended-upgrades package:
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6A030B21BA07F4FB
    sudo apt update
    sudo apt install unattended-upgrades
    

    If you see the following prompt, select keep the local version currently installed:

    What do you want to do about modified configuration file 50unattended-upgrades?
  4. Run the following command:
    sudo apt autoremove
  5. Edit the /etc/apt/apt.conf.d/50unattended-upgrades file and un-comment the following line:

    Skip this step if you have previously applied security patches to your Ubuntu environment following these instructions.

    "${distro_id}:${distro_codename}-security";
    Leave all other lines commented out.
  6. Run the following command:
    sudo unattended-upgrade -d
  7. Edit the /etc/init.d/zookeeper-server file and change su to runuser in all of the following lines:

    Skip this step if you have previously applied security patches to your Ubuntu environment following these instructions.

    Before:

    su -s /bin/bash zookeeper -c "${DAEMON_SCRIPT} start"
    su -s /bin/bash zookeeper -c "${DAEMON_SCRIPT} stop"
    su -s /bin/bash zookeeper -c "zookeeper-server-initialize $*"
    

    After:

    runuser -s /bin/bash zookeeper -c "${DAEMON_SCRIPT} start"
    runuser -s /bin/bash zookeeper -c "${DAEMON_SCRIPT} stop"
    runuser -s /bin/bash zookeeper -c "zookeeper-server-initialize $*"
    
  8. Reboot the system:
    sudo reboot
  9. Run the following command to start Splunk UBA and all services:
    /opt/caspida/bin/Caspida start-all

Troubleshoot the Ubuntu upgrade

While upgrading Ubuntu some environment specific issues can arise. See the following known issues and how to work around them.

Snapd

You might encounter the following error message if snapd is in an unexpected state:

FileNotFoundError: [Errno 2] No such file or directory: 'snap'

Workaround steps:

  1. Remove and purge the snapd package:
    sudo apt purge snapd
  2. Reinstall the snapd package:
    sudo apt install snapd
  3. Re-run the upgrade_ubuntu.sh script.

Zookeeper server missing

You might encounter the following error if zookeeper is upgraded to a newer version, causing the removal of the zookeeper-server: Can't select installed nor candidate version from package 'zookeeper-server' as it has neither of them

Workaround steps:
Skip holding this package.

  1. Open and edit /opt/caspida/upgrade/utils/upgrade_ubuntu.sh using a text editor.
  2. Modify line 177 from the following:
    CMD="apt-mark hold zookeeper zookeeper-server redis-server redis-tools"
    To appear as follows:
    CMD="apt-mark hold redis-server redis-tools"
  3. As applicable, repeat for all nodes in your cluster.
  4. Re-run the upgrade_ubuntu.sh script.

Next steps

Verify a successful upgrade of Splunk UBA.

Last modified on 31 July, 2023
Upgrade Splunk UBA prerequisites   Upgrade a single node RHEL installation of Splunk UBA

This documentation applies to the following versions of Splunk® User Behavior Analytics: 5.1.0


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters