text/template language to manipulate # Cannot be used at the same time as basic_auth or authorization. # Does not apply to the plaintext endpoint on `/promtail/api/v1/raw`. If we're working with containers, we know exactly where our logs will be stored! # The list of Kafka topics to consume (Required). This # log line received that passed the filter. Download Promtail binary zip from the release page curl -s https://api.github.com/repos/grafana/loki/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep promtail-linux-amd64.zip | wget -i - Promtail has a configuration file (config.yaml or promtail.yaml), which will be stored in the config map when deploying it with the help of the helm chart. If a position is found in the file for a given zone ID, Promtail will restart pulling logs <__meta_consul_address>:<__meta_consul_service_port>. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. Running commands. The template stage uses Gos # A structured data entry of [example@99999 test="yes"] would become. You can add your promtail user to the adm group by running. In general, all of the default Promtail scrape_configs do the following: Each job can be configured with a pipeline_stages to parse and mutate your log entry. We use standardized logging in a Linux environment to simply use echo in a bash script. Defines a gauge metric whose value can go up or down. rev2023.3.3.43278. renames, modifies or alters labels. The captured group or the named, # captured group will be replaced with this value and the log line will be replaced with. # Value is optional and will be the name from extracted data whose value, # will be used for the value of the label. level=error ts=2021-10-06T11:55:46.626337138Z caller=client.go:355 component=client host=logs-prod-us-central1.grafana.net msg="final error sending batch" status=400 error="server returned HTTP status 400 Bad Request (400): entry for stream '(REDACTED), promtail-linux-amd64 -dry-run -config.file ~/etc/promtail.yaml, https://github.com/grafana/loki/releases/download/v2.3.0/promtail-linux-amd64.zip. It uses the same service discovery as Prometheus and includes analogous features for labelling, transforming, and filtering logs before ingestion into Loki. # SASL configuration for authentication. You may need to increase the open files limit for the Promtail process # Describes how to relabel targets to determine if they should, # Describes how to discover Kubernetes services running on the, # Describes how to use the Consul Catalog API to discover services registered with the, # Describes how to use the Consul Agent API to discover services registered with the consul agent, # Describes how to use the Docker daemon API to discover containers running on, "^(?s)(?P