How To Install python3-graypy on Kali Linux

In this tutorial we learn how to install python3-graypy on Kali Linux. python3-graypy is Python logging handler that sends messages in GELF (Python 3)

Introduction

In this tutorial we learn how to install python3-graypy on Kali Linux.

What is python3-graypy

python3-graypy is:

This package can be used to sent messages to Graylog2 using a custom handler for the builtin logging library in the Graylog Extended Log Format (GELF).

Alternately, GELFRabbitHandler can be used to send messages to RabbitMQ. Your Graylog2 server needs to be configured to consume messages via AMQP then. This prevents log messages from being lost due to dropped UDP packets (GELFHandler sends messages to Graylog2 using UDP). You will need to configure RabbitMQ with a ‘gelf_log’ queue and bind it to the ’logging.gelf’ exchange so messages are properly routed to a queue that can be consumed by Graylog2 (the queue and exchange names may be customized to your liking).

graypy can be easily integrated into Django’s logging settings.

This is the Python 3 version of the package.

There are three methods to install python3-graypy on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python3-graypy Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install python3-graypy

Install python3-graypy Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python3-graypy

Install python3-graypy Using aptitude

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

sudo aptitude update

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

sudo aptitude -y install python3-graypy

How To Uninstall python3-graypy on Kali Linux

To uninstall only the python3-graypy package we can use the following command:

sudo apt-get remove python3-graypy

Uninstall python3-graypy And Its Dependencies

To uninstall python3-graypy and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove python3-graypy

Remove python3-graypy Configurations and Data

To remove python3-graypy configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge python3-graypy

Remove python3-graypy configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge python3-graypy

Dependencies

python3-graypy have the following dependencies:

References

Summary

In this tutorial we learn how to install python3-graypy package on Kali Linux using different package management tools: apt, apt-get and aptitude.