[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for Kubernetes](../../index.md) > [Step-by-step guides](../index.md) > Installing applications from Cloud Marketplace > Installing Filebeat OSS

# Installing Filebeat OSS


[Filebeat OSS](https://www.elastic.co/beats/filebeat) is a plugin for collecting and forwarding logs to the OpenSearch ecosystem. Installed in a [Managed Service for Kubernetes cluster](../../concepts/index.md#kubernetes-cluster), Filebeat OSS collects cluster and [pod](../../concepts/index.md#pod) logs and forwards them to [Yandex Managed Service for OpenSearch](../../../managed-opensearch/index.md).

## Getting started {#before-you-begin}

1. If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

   The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

1. Make sure the Managed Service for Kubernetes cluster resides in the same [cloud network](../../../vpc/concepts/network.md) as the [Managed Service for OpenSearch cluster](../../../managed-opensearch/concepts/index.md).

1. [Make sure](../connect/security-groups.md) the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If a rule is missing, [add it](../../../vpc/operations/security-group-add-rule.md).

    {% note warning %}
    
    The configuration of security groups determines performance and availability of the cluster and the services and applications running in it.
    
    {% endnote %}

1. Enable the compatibility mode to support the Filebeat OSS client in OpenSearch by running this query:

   ```bash
   wget "https://storage.yandexcloud.net/cloud-certs/CA.pem" && \
   curl \
   --user <username>:<password> --cacert CA.pem \
   --request PUT https://<name_of_host_with_DATA_role>:9200/_cluster/settings \
   --header "Content-Type: application/json" \
   --data \
   '{
   "persistent": {
     "compatibility": {
       "override_main_response_version": true
     }
   }
   }'
   ```

   Where:
   * `<username>`: OpenSearch username.
   * `<password>`: OpenSearch user password.
   * `<host_name>`: Name of the Managed Service for OpenSearch host with the [data role](../../../managed-opensearch/concepts/host-roles.md#data), e.g., `rc1a-7hkolet********.mdb.yandexcloud.net`.

   A successful response will have this format:

   ```json
   {
     "acknowledged":true,
     "persistent":
     {
       "compatibility":
       {
         "override_main_response_version":"true"
       }
     },
     "transient":{}
   }
   ```

## Installation from Yandex Cloud Marketplace {#marketplace-install}

1. In the [management console](https://console.yandex.cloud), select a folder.
1. Navigate to **Managed Service for&nbsp;Kubernetes**.
1. Click the name of the Managed Service for Kubernetes cluster you need and select the ![image](../../../_assets/marketplace.svg) **Marketplace** tab.
1. Under **Application available for installation**, select [Filebeat OSS](https://yandex.cloud/en/marketplace/products/yc/filebeat-oss) and click **Go to install**.
1. Configure the application:
   * **Namespace**: Create a new [namespace](../../concepts/index.md#namespace), e.g., `filebeat-oss-space`. If you leave the default namespace, Filebeat OSS may work incorrectly.
   * **Application name**: Specify the application name, e.g., `filebeat-oss`.
   * **OpenSearch username**: Enter the username that Filebeat OSS will use to connect to the Managed Service for OpenSearch cluster.
   * **OpenSearch connection password**: Enter the user password for the Managed Service for OpenSearch cluster.
   * **OpenSearch FQDN**: Enter the URL and port for the Managed Service for OpenSearch cluster host with the data role, e.g., `https://rc1a-7hkolet********.mdb.yandexcloud.net:9200`. For more information about connecting to a cluster, see [this guide](../../../managed-opensearch/operations/connect/index.md).
1. Click **Install**.
1. Wait for the application status to change to `Deployed`.

## Installation using a Helm chart {#helm-install}

1. [Install Helm](https://helm.sh/docs/intro/install/) v3.8.0 or higher.
1. [Install kubect](https://kubernetes.io/docs/tasks/tools/install-kubectl) and [configure it to work with the new cluster](../connect/index.md#kubectl-connect).
1. To install a [Helm chart](https://helm.sh/docs/topics/charts/) with Filebeat OSS, run this command:

   ```bash
   helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/filebeat-oss/chart/filebeat-oss \
     --version 7.12.1-1 \
     --untar && \
   helm install \
     --namespace <namespace> \
     --create-namespace \
     --set app.url='<URL_and_port_for_Managed_Service_for_OpenSearch_cluster_with_DATA_role>' \
     --set app.username='<OpenSearch_cluster_user_name>' \
     --set app.password='<OpenSearch_cluster_user_password>' \
     filebeatoss ./filebeat-oss/
   ```

   This command will also create a new namespace required for Filebeat OSS.

   If you set `namespace` to the default namespace, Filebeat OSS may work incorrectly. We recommend specifying a value different from all the existing namespaces, e.g., `filebeat-oss-space`.

   {% note info %}
   
   If you are using a Helm version below 3.8.0, add the `export HELM_EXPERIMENTAL_OCI=1 && \` string at the beginning of the command to enable [Open Container Initiative](https://opencontainers.org/) (OCI) support in the Helm client.
   
   {% endnote %}

1. Make sure the Filebeat OSS pod has switched to `Running`:

   ```bash
   kubectl get pods --namespace=<namespace> -l app=filebeatoss-filebeat-oss -w
   ```

## Use cases {#examples}

* [Managed Service for Kubernetes cluster monitoring with Filebeat OSS](../../tutorials/filebeat-oss-monitoring.md)

## See also {#see-also}

* [Managed Service for OpenSearch guides](../../../managed-opensearch/index.md)
* [Filebeat documentation](https://www.elastic.co/guide/en/beats/filebeat/master/index.html)