How To Install rsyslog-elasticsearch on Ubuntu 20.04

In this tutorial we learn how to install rsyslog-elasticsearch on Ubuntu 20.04. rsyslog-elasticsearch is Elasticsearch output plugin for rsyslog Elasticsearch output plugin for rsyslog

Introduction

In this tutorial we learn how to install rsyslog-elasticsearch on Ubuntu 20.04.

What is rsyslog-elasticsearch

rsyslog-elasticsearch is:

This plugin allows rsyslog to write syslog messages to Elasticsearch, a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents.

Package: rsyslog-elasticsearch Architecture: amd64 Version: 8.2001.0-1ubuntu1 Priority: extra Section: universe/admin Source: rsyslog Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Michael Biebl [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 94 Depends: libc6 (>= 2.14), libcurl3-gnutls (>= 7.16.2), rsyslog (= 8.2001.0-1ubuntu1) Filename: pool/universe/r/rsyslog/rsyslog-elasticsearch_8.2001.0-1ubuntu1_amd64.deb Size: 19004 MD5sum: ee0bd76c4dde25910e02690dfa4a72fd SHA1: d2a17b8d045b56e18c0a1cb59b63e2c7e87179a3 SHA256: 97111735100a7ebabf44e53aa55e7a9c3a3ef091560379f4b63443819df91f80 Homepage: http://www.rsyslog.com/ Description-en: Elasticsearch output plugin for rsyslog This plugin allows rsyslog to write syslog messages to Elasticsearch, a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents.

There are three methods to install rsyslog-elasticsearch on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install rsyslog-elasticsearch Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install rsyslog-elasticsearch using apt-get by running the following command:

sudo apt-get -y install rsyslog-elasticsearch

Install rsyslog-elasticsearch Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install rsyslog-elasticsearch using apt by running the following command:

sudo apt -y install rsyslog-elasticsearch

Install rsyslog-elasticsearch Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install rsyslog-elasticsearch using aptitude by running the following command:

sudo aptitude -y install rsyslog-elasticsearch

How To Uninstall rsyslog-elasticsearch on Ubuntu 20.04

To uninstall only the rsyslog-elasticsearch package we can use the following command:

sudo apt-get remove rsyslog-elasticsearch

Uninstall rsyslog-elasticsearch And Its Dependencies

To uninstall rsyslog-elasticsearch and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove rsyslog-elasticsearch

Remove rsyslog-elasticsearch Configurations and Data

To remove rsyslog-elasticsearch configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge rsyslog-elasticsearch

Remove rsyslog-elasticsearch configuration, data, and all of its dependencies

We can use the following command to remove rsyslog-elasticsearch configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge rsyslog-elasticsearch

References

Summary

In this tutorial we learn how to install rsyslog-elasticsearch package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.