Red Hat Enterprise Linux
This page describes the steps for installing and upgrading NXLog Agent on Red Hat Enterprise Linux (RHEL) and its derivatives.
|
We test and officially support our packages only on RHEL. While NXLog Agent may work on distributions that are binary-compatible with RHEL, such as AlmaLinux, CentOS (discontinued and not to be confused with CentOS Stream), and Rocky Linux, we don’t guarantee full compatibility. |
Installing NXLog Agent
First, download the appropriate NXLog Agent installation file.
-
Log in to NXLog Platform.
-
In the left navigation menu, click Product download.
-
Select the NXLog Agent tab.
-
Select and download the installation file for your operating system version and architecture.
Table 1. Available RHEL NXLog Agent files Platform Archive RHEL 7
nxlog-6.10.10368_rhel7_x86_64.tar.bz2
RHEL 8
nxlog-6.10.10368_rhel8_x86_64.tar.bz2
nxlog-6.10.10368_rhel8_aarch64.tar.bz2
nxlog-6.10.10368_rhel8_ppc64le.tar.bz2RHEL 9
nxlog-6.10.10368_rhel9_x86_64.tar.bz2
nxlog-6.10.10368_rhel9_aarch64.tar.bz2
nxlog-6.10.10368_rhel9_ppc64le.tar.bz2RHEL 10
nxlog-6.10.10368_rhel10_x86_64.tar.bz2
nxlog-6.10.10368_rhel10_aarch64.tar.bz2
nxlog-6.10.10368_rhel10_ppc64le.tar.bz2Amazon Linux 2
nxlog-6.10.10368_amzn2_x86_64.tar.bz2
nxlog-6.10.10368_amzn2_aarch64.tar.bz2Amazon Linux 2023
nxlog-6.10.10368_amzn2023_x86_64.tar.bz2
nxlog-6.10.10368_amzn2023_aarch64.tar.bz2Generic RPM
nxlog-6.10.10368_generic_rpm_x86_64.rpm
The RHEL 7, RHEL 8, RHEL 9, and RHEL 10 archives above each contain several RPMs (see NXLog Agent packages in a RHEL archive below). These RPMs have dependencies on system-provided RPMs.
The generic RPM above contains all the libraries (such as libpcre and libexpat) that are needed by NXLog Agent. The only dependency is libc. However, some modules are not available, such as im_checkpoint. See modules by installation package for details. The advantage of the generic RPM is that it can be installed on most RPM-based Linux distributions.
The examples below use the RHEL 10 x86_64 file. Replace the file name accordingly when executing the commands.
Connecting to NXLog Platform
You can configure NXLog Agent to connect to NXLog Platform automatically.
The installation looks for the following environment variables to configure the Remote Management (xm_admin) instance in the managed.conf file.
- NXP_ADDRESS
-
The NXLog Platform Agent Management hostname or IP address and port. The installation sets the Host to this value.
- NXP_AGENT_LABEL
-
Sets the
agent_labellabel to this value. - NXP_OTHER_LABELS
-
A list of comma-separated key-value pairs, specifying custom labels. Keys and values cannot start with a digit, and spaces will be replaced with underscores (
_). A maximum of ten key-value pairs is allowed.
You can use the labels to Set up automatic agent enrollment.
Set these variables from the terminal before executing the installation. For example:
$ export NXP_ADDRESS="agents.nxlog.example.com:5515"
$ export NXP_AGENT_LABEL="new"
$ export NXP_OTHER_LABELS="key1=value1,key2=value2"
Installing interactively
-
Transfer the file to the target server using SFTP or a similar secure method.
-
Log in to the target server and extract the contents of the archive (unless you are using the generic package):
$ tar -xvf nxlog-6.10.10368_rhel10_x86_64.tar.bz2Table 2. NXLog Agent packages in a RHEL archive Package Description nxlog-6.10.10368_*.rpm
The main NXLog Agent package
nxlog-checkpoint-6.10.10368_*.rpm
(RHEL 7 and RHEL 8 x86-64 only)Provides the im_checkpoint module
nxlog-dbi-6.10.10368_*.rpm
(Amazon Linux and RHEL 7 only)nxlog-java-6.10.10368_*.rpm
nxlog-kafka-6.10.10368_*.rpm (Except Amazon Linux 2023)
nxlog-odbc-6.10.10368_*.rpm
nxlog-pcap-6.10.10368_*.rpm
Provides the im_pcap module
nxlog-perl-6.10.10368_*.rpm
nxlog-python-6.10.10368_*.rpm
nxlog-ruby-6.10.10368_*.rpm
(Amazon Linux 2, RHEL 7, and RHEL 8 only)nxlog-systemd-6.10.10368_*.rpm
Provides the im_systemd module
nxlog-wseventing-6.10.10368_*.rpm
Provides the im_wseventing module
nxlog-zmq-6.10.10368_*.rpm
(Except Amazon Linux 2023) -
Optional: To change the NXLog Agent user and group for the installation, set the
NXLOG_USERandNXLOG_GROUPenvironment 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 innxlog.conf, and to set ownership of the/opt/nxlogdirectory.-
If the user or group already exists, the installation issues a warning and continues.
-
If the user or group creation fails, the installation returns an error and stops.
-
The created user and group will be deleted when you uninstall NXLog Agent.
-
If the user or group deletion fails, the uninstall issues a warning and continues.
$ export NXLOG_USER=nxlog2 $ export NXLOG_GROUP=nxlog2 -
-
Download the public key file from the NXLog’s public contrib repository and import it to the RPM database.
$ sudo rpm --import nxlog-pubkey.ascSee Verify the signature of the RPM package for further details. -
If you are installing the
nxlog-zmqpackage, enable the EPEL repository so ZeroMQ dependencies will be available:$ sudo yum install -y epel-release -
Use yum to install the required NXLog Agent packages (or the generic package) and dependencies.
$ sudo -E yum install ./nxlog-6.10.10368_rhel10_x86_64.rpm -
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.
For more details about configuring NXLog Agent to collect logs on Linux, see Linux log sources. -
Verify the configuration file syntax.
$ sudo /opt/nxlog/bin/nxlog -v 2025-08-02 08:05:06 INFO configuration OK -
Start the service:
$ sudo systemctl start nxlog -
Check that the NXLog Agent service is running.
$ sudo systemctl status nxlog ● nxlog.service - NXLog daemon Loaded: loaded (/usr/lib/systemd/system/nxlog.service; enabled; preset: disabled) Active: active (running) since Tue 2025-09-09 14:33:13 EDT; 3min 30s ago Main PID: 6765 (nxlog) Tasks: 5 (limit: 125793) Memory: 2.0M CPU: 145ms CGroup: /system.slice/nxlog.service └─6765 /opt/nxlog/bin/nxlog -f -q [...]
Upgrading NXLog Agent
To upgrade an NXLog Agent installation to the latest release, use yum as described in the installation instructions above.
The installation will not modify the existing configuration files unless you enable the FORCE environment variable.
However, we recommend backing up the configuration files before starting this process.
$ sudo yum install ./nxlog-6.10.10368_rhel10_x86_64.rpm
When upgrading, you can configure new NXLog Platform settings by setting the relevant environment variables in addition to the FORCE environment variable.
When forcing a configuration update, the installation backs up the nxlog.conf and managed.conf files before applying the changes.
$ export NXP_ADDRESS="agents.nxlog.example.com:5515" NXP_AGENT_LABEL="rhel" FORCE="TRUE"
$ sudo -E yum install ./nxlog-6.10.10368_rhel10_x86_64.rpm
| 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 yum remove.
To remove any packages that were dependencies of NXLog Agent but are not required by any other packages, use the --setopt=clean_requirements_on_remove=1 option.
Verify the operation before going ahead!
$ sudo yum remove 'nxlog-*'
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).
|