Debian/Ubuntu

This page describes the steps for installing and upgrading NXLog Agent on Debian GNU/Linux and its derivatives.

Installing NXLog Agent

First, download the appropriate NXLog Agent installation file from the NXLog website.

  1. Log in to your account, hover your mouse over your account avatar icon at the top of the page, and click on Downloads.

  2. In the Downloads section:

    1. select your NXLog Agent version from the drop-down menu

    2. select your platform by clicking one of the icons

    3. select the files you want to download

  3. Click Download at the bottom.

    Table 1. Available Debian/Ubuntu NXLog Agent files
    Platform Archive

    Debian 10 (Buster)

    nxlog-6.2.9212_debian10_amd64.tar.bz2
    nxlog-6.2.9212_debian10_arm64.tar.bz2

    Debian 11 (Bullseye)

    nxlog-6.2.9212_debian11_amd64.tar.bz2
    nxlog-6.2.9212_debian11_arm64.tar.bz2

    Ubuntu 16.04 (Xenial Xerus)

    nxlog-6.2.9212_ubuntu16_amd64.tar.bz2

    Ubuntu 18.04 (Bionic Beaver)

    nxlog-6.2.9212_ubuntu18_amd64.tar.bz2

    Ubuntu 20.04 (Focal Fossa)

    nxlog-6.2.9212_ubuntu20_amd64.tar.bz2
    nxlog-6.2.9212_ubuntu20_armhf.tar.bz2
    nxlog-6.2.9212_ubuntu20_arm64.tar.bz2

    Ubuntu 22.04 (Focal Fossa)

    nxlog-6.2.9212_ubuntu22_amd64.tar.bz2
    nxlog-6.2.9212_ubuntu22_armhf.tar.bz2
    nxlog-6.2.9212_ubuntu22_arm64.tar.bz2

    Generic DEB

    nxlog-6.2.9212_generic_deb_amd64.deb

    The NXLog Agent installer packages are digitally signed. See Verify the signature of the DEB package for further details.
  4. Transfer the file to the target server using SFTP or a similar secure method.

  5. Log in to the target server and extract the contents of the archive (unless you are using the generic package):

    The examples below use the amd64 installer. Replace your exact package name accordingly when executing the commands.

    # tar -xjf nxlog-6.2.9212_debian9_amd64.tar.bz2
    Table 2. NXLog Agent packages in a Debian/Ubuntu archive
    Package Description

    nxlog-6.2.9212_amd64.deb

    The main NXLog Agent package

    nxlog-checkpoint-6.2.9212_amd64.deb

    Provides the im_checkpoint module

    nxlog-dbi-6.2.9212_amd64.deb

    Provides the im_dbi and om_dbi modules

    nxlog-java-6.2.9212_amd64.deb

    Provides the xm_java, im_java, and om_java modules

    nxlog-kafka-6.2.9212_amd64.deb

    Provides the im_kafka and om_kafka modules

    nxlog-odbc-6.2.9212_amd64.deb

    Provides the im_odbc and om_odbc modules

    nxlog-pcap-6.2.9212_amd64.deb

    Provides the im_pcap module

    nxlog-perl-6.2.9212_amd64.deb

    Provides the xm_perl, im_perl, and om_perl modules

    nxlog-python-6.2.9212_amd64.deb

    Provides the xm_python, im_python, and om_python modules

    nxlog-ruby-6.2.9212_amd64.deb

    Provides the xm_ruby, im_ruby, and om_ruby modules

    nxlog-systemd-6.2.9212_amd64.deb

    Provides the im_systemd module

    nxlog-wseventing-6.2.9212_amd64.deb

    Provides the im_wseventing module

    nxlog-zmq-6.2.9212_amd64.deb

    Provides the im_zmq and om_zmq modules

  6. Install the NXLog Agent package(s) and their dependencies.

    1. Optional: To change the NXLog Agent user and group for the installation, set the NXLOG_USER and NXLOG_GROUP environment variables. During installation, a new user and group will be created from these environment variables. They will be used for the User and Group directives in nxlog.conf, and to set ownership of the /opt/nxlog directory. Specifying an already existing user or group is not supported. The created user and group will be deleted when you uninstall NXLog Agent.

      # export NXLOG_USER=nxlog2
      # export NXLOG_GROUP=nxlog2
    2. Use dpkg to install the required NXLog Agent packages (or the generic package, if you are using that).

      # dpkg -i nxlog-6.2.9212_amd64.deb
    3. If dpkg returned errors about uninstalled dependencies, use apt-get to install them and complete the NXLog Agent installation.

      # apt-get -f install
  7. Configure NXLog Agent by editing /opt/nxlog/etc/nxlog.conf. See Log collection in the NXLog Platform User Guide for more information and configuration examples.

  8. Verify the configuration file syntax.

    # /opt/nxlog/bin/nxlog -v
    2017-03-17 08:05:06 INFO configuration OK
  9. Start the service using the service command:

    # service nxlog start
  10. Check that the NXLog Agent service is running with the service command.

    # service nxlog status
    ● nxlog.service - LSB: logging daemon
       Loaded: loaded (/etc/init.d/nxlog)
       Active: active (running) since Wed 2016-10-19 22:21:36 BST; 3h 49min ago
      Process: 518 ExecStart=/etc/init.d/nxlog start (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/nxlog.service
               └─6297 /opt/nxlog/bin/nxlog
    [...]

Upgrading NXLog Agent

To upgrade an NXLog Agent installation to the latest release use dpkg as described in the installation instructions above. We recommend making a backup of the configuration files before starting this process.

# dpkg -i nxlog-6.2.9212_amd64.deb

When upgrading from an NXLog Agent trial to a licensed copy with optional packages installed, such as nxlog-trial-python, use dpkg -i --auto-configure.

# dpkg -i --auto-configure nxlog-6.2.9212_amd64.deb \
  nxlog-python_6.2.9212_amd64.deb

Make sure to edit this example to include all nxlog-trial packages that are installed.

If dpkg returns errors about uninstalled dependencies, resolve them with apt-get.

# apt-get -f install
The same user and group will be used for the upgrade as was used for the original installation. See installation user and group above. Changing to a different user and group during an upgrade is not supported.

Uninstalling NXLog Agent

To uninstall NXLog Agent, use apt-get. To remove any unused dependencies (system-wide), use the --auto-remove option. Verify the operation before going ahead!

# apt-get remove '^nxlog*'

You can also use apt-get purge instead to remove the configuration files.

This procedure may not remove all files that were created while configuring NXLog Agent. Likewise, any files created as a result of NXLog Agent’s operations will not be removed. To find these files, examine the NXLog Agent configuration files and check the NXLog Agent installation directory (/opt/nxlog).