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.
-
Log in to your account, hover your mouse over your account avatar icon at the top of the page, and click on Downloads.
-
In the Downloads section:
-
select your NXLog Agent version from the drop-down menu
-
select your platform by clicking one of the icons
-
select the files you want to download
-
-
Click Download at the bottom.
Table 1. Available Debian/Ubuntu NXLog Agent files Platform Archive Debian 10 (Buster)
nxlog-6.5.9781_debian10_amd64.tar.bz2
nxlog-6.5.9781_debian10_arm64.tar.bz2Debian 11 (Bullseye)
nxlog-6.5.9781_debian11_amd64.tar.bz2
nxlog-6.5.9781_debian11_arm64.tar.bz2Ubuntu 16.04 (Xenial Xerus)
nxlog-6.5.9781_ubuntu16_amd64.tar.bz2
Ubuntu 18.04 (Bionic Beaver)
nxlog-6.5.9781_ubuntu18_amd64.tar.bz2
Ubuntu 20.04 (Focal Fossa)
nxlog-6.5.9781_ubuntu20_amd64.tar.bz2
nxlog-6.5.9781_ubuntu20_armhf.tar.bz2
nxlog-6.5.9781_ubuntu20_arm64.tar.bz2Ubuntu 22.04 (Focal Fossa)
nxlog-6.5.9781_ubuntu22_amd64.tar.bz2
nxlog-6.5.9781_ubuntu22_armhf.tar.bz2
nxlog-6.5.9781_ubuntu22_arm64.tar.bz2Generic DEB
nxlog-6.5.9781_generic_deb_amd64.deb
The NXLog Agent installer packages are digitally signed. See Verify the signature of the DEB package for further details.
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 URL and port. The installation sets the Host to this value.
- NXP_AGENT_LABEL
-
Sets the
agent_label
label to this value. You can use this label to Set up automatic agent enrollment.
Set these variables from the terminal before executing the installation. For example:
$ export NXP_ADDRESS="agents.example.com:5515"
$ export NXP_AGENT_LABEL="new"
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):
The examples below use the
amd64
installer. Replace the package name accordingly when executing the commands.# tar -xvf nxlog-6.5.9781_debian9_amd64.tar.bz2
Table 2. NXLog Agent packages in a Debian/Ubuntu archive Package Description nxlog-6.5.9781_amd64.deb
The main NXLog Agent package
nxlog-checkpoint-6.5.9781_amd64.deb
Provides the im_checkpoint module
nxlog-dbi-6.5.9781_amd64.deb
nxlog-java-6.5.9781_amd64.deb
nxlog-kafka-6.5.9781_amd64.deb
nxlog-odbc-6.5.9781_amd64.deb
nxlog-pcap-6.5.9781_amd64.deb
Provides the im_pcap module
nxlog-perl-6.5.9781_amd64.deb
nxlog-python-6.5.9781_amd64.deb
nxlog-ruby-6.5.9781_amd64.deb
nxlog-systemd-6.5.9781_amd64.deb
Provides the im_systemd module
nxlog-wseventing-6.5.9781_amd64.deb
Provides the im_wseventing module
nxlog-zmq-6.5.9781_amd64.deb
-
Install the NXLog Agent package(s) and their dependencies.
-
Optional: To change the NXLog Agent user and group for the installation, set the
NXLOG_USER
andNXLOG_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 innxlog.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
-
Use
dpkg
to install the required NXLog Agent packages (or the generic package, if you are using that).# dpkg -i nxlog-6.5.9781_amd64.deb
-
If
dpkg
returned errors about uninstalled dependencies, useapt-get
to install them and complete the NXLog Agent installation.# apt-get -f install
-
-
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.
# /opt/nxlog/bin/nxlog -v 2017-03-17 08:05:06 INFO configuration OK
-
Start the service using the
service
command:# service nxlog start
-
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.
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.
# dpkg -i nxlog-6.5.9781_amd64.deb
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.example.com" NXP_AGENT_LABEL="ubuntu" FORCE="TRUE"
# dpkg -i nxlog-6.5.9781_amd64.deb
If upgrading from an NXLog Agent trial to a licensed copy and you have optional packages installed, such as
Make sure to edit this example to include all |
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 ).
|