This is archived documentation for 1.2.0. Go to the latest version.
Ingest logs using Promtail
Promtail is an agent that ships the contents of local logs to Grafana Enterprise Logs (GEL).
Verify that Promtail is running
For the following common installation methods, check that Promtail is running:
- binary: To check that the executable is running, use
ps -ef | grep promtail.
- Docker: To check if a Promtail container is running, run
- Kubernetes: To check that Promtail pods are running, use the
kubectl get pods | grep promtailcommand when you are in the correct namespace.
Configure Promtail to write to GEL
To configure Promtail to send logs to the demo tenant, add a clients block to its configuration.
Example of a minimal configuration:
server: http_listen_port: 9080 grpc_listen_port: 0 positions: filename: /tmp/positions.yaml clients: - url: http://enterprise-logs:3100/loki/api/v1/push basic_auth: username: demo password: <token> scrape_configs: - job_name: system static_configs: - targets: - localhost labels: job: varlogs __path__: /var/log/*log
For more information, refer to Configuring Promtail.
Run this Promtail configuration using Docker
To run this configuration, store the preceding configuration locally in the file
promtail.yaml, and run the following code:
$ docker run \ -d \ --name=demo-promtail \ --network=enterprise-logs \ -v $(pwd)/promtail.yaml:/etc/promtail/config.yml:z \ grafana/promtail:2.1.0
Verify that Promtail is writing to GEL
From Grafana Explore, you can query the data from your GEL cluster via the Enterprise Logs data source.
Related Enterprise Logs resources
Grafana Enterprise Logs: Logging with security and scale
Join us for this webinar, which will cover: Challenges with logging as organizations scale and the volume of logs explodes, how Grafana Enterprise Logs enables organizations to make logs available to any team members who need them, features available in GEL and how to get access, a live product demo so you can see GEL for the first time
VIDEO: Watch this first-look demo of the new Grafana Enterprise Logs
Based on Loki, Grafana Enterprise Logs is part of the Grafana Enterprise Stack for composing and scaling observability on your own infrastructure.
Introducing Grafana Enterprise Logs, a core part of the Grafana Enterprise Stack integrated observability solution
Powered by the Loki open source project, the Enterprise Logs offering joins metrics and dashboards in our enterprise-ready stack for self-managed observability.