Installing dependencies

You can configure the Wazuh module for GCP either in the Wazuh manager or in a Wazuh agent. This choice depends solely on how you access your GCP infrastructure in your environment.

You only need to install dependencies when configuring the integration with GCP in a Wazuh agent. The Wazuh manager already includes all the necessary dependencies.

Python

The Wazuh module for GCP is compatible with Python 3.8–3.12. While later Python versions should work as well, we can't assure they are compatible. If you do not have Python 3 already installed, run the following command on your monitored endpoint.

# yum update && yum install python3

You can install the required modules with Pip, the Python package manager. Most UNIX distributions have this tool available in their software repositories. Run the following command to install pip on your endpoint if you do not have it already installed.

# yum update && yum install python3-pip

We recommend using Pip 19.3 or later to simplify the installation of the dependencies. Run this command to check your pip version.

# pip3 --version

An example output is as follows.

pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

If your pip version is less than 19.3, run the following command to upgrade the version.

# pip3 install --upgrade pip

Google Cloud pip dependencies

google-cloud-pubsub and google-cloud-storage are the official Python libraries supported by Google to manage Google Cloud Pub/Sub and Cloud Storage resources.

Google Cloud Pub/Sub API is used to pull the log messages from the Pub/Sub queue, while Google Cloud Storage API is used to store and retrieve data.

Run the following command to install the dependencies depending on your Python version:

$ sudo pip3 install google-cloud-core==1.7.1 google-cloud-pubsub==2.7.1 google-cloud-storage==1.39.0 pytz==2020.1 setuptools==68.0.0