Skip to content

Promtail agent

Promtail is a component of the Loki log aggregation system and is designed to scrape, process, and forward log data to Loki for storage and querying. It serves as an agent responsible for collecting and sending log entries from various sources, such as log files and system logs, making them available for efficient querying and analysis in Loki. Promtail is often used in combination with Grafana to provide a comprehensive solution for log collection, storage, and visualization in observability and monitoring systems.

Official Promtail Documentation

Promtail has a detailed and extensive official documentation which includes comprehensive guides on installation, configuration, and usage. You can refer to it for better understanding and effective usage of the tool.

Official Promtail Documentation Official Promtail Helm Chart

This documentation focusses on how to use Promtail with our observability platform.

Configuration

Promtail is almost exclusively used on Kubernetes, and the easiest way to deploy it is by using the official Helm chart. By default, this Helm chart will collect all logs from all Pods in your cluster.

Prequisites

To proceed with the configuration, ensure that:

  1. You have a working, healthy Kubernetes cluster.
  2. You have a recent version of Helm installed on your workstation.
  3. You have administrative cluster-wide access to install Helm charts.
  4. Your Cyso customer ID and API key are available.

Configurations steps

  1. Prepare your Helm environment.

    helm repo add grafana https://grafana.github.io/helm-charts
    helm repo update
    
  2. Prepare a file with your Helm configuration. In this example we name this file values.yaml.

    config:
      clients:
        - url: https://api.ams2.observe.cyso.com/{customer_id}}/logs
          tenant_id: '{customer_id}'
          basic_auth:
            username: '{customer_id}'
            password: '{token}'
    

    Note

    You should replace {customer_id} with your actual Cyso Customer ID and {token} with your received API key.

  3. Install the Helm file with your values.yaml.

    helm upgrade --install --create-namespace --namespace promtail promtail grafana/promtail -f values.yaml
    

Troubleshooting

If you encounter issues during setup:

  • Confirm that all Pods are running and healthy.
  • Review the Pod logs for any errors.
  • Check the supplied credentials for accuracy. Incorrect credentials will inhibit log writing.

In case you need additional assistance, contact Cyso's support team.