<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Send log data to Grafana Enterprise Logs on Grafana Labs</title><link>https://grafana.com/docs/enterprise-logs/v1.9.x/send-data/</link><description>Recent content in Send log data to Grafana Enterprise Logs on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/enterprise-logs/v1.9.x/send-data/index.xml" rel="self" type="application/rss+xml"/><item><title>Configure Promtail for Grafana Enterprise Logs</title><link>https://grafana.com/docs/enterprise-logs/v1.9.x/send-data/promtail/</link><pubDate>Tue, 16 Jul 2024 15:42:20 +0000</pubDate><guid>https://grafana.com/docs/enterprise-logs/v1.9.x/send-data/promtail/</guid><content><![CDATA[&lt;h1 id=&#34;configure-promtail-for-grafana-enterprise-logs&#34;&gt;Configure Promtail for Grafana Enterprise Logs&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;/docs/loki/latest/clients/promtail/&#34;&gt;Promtail&lt;/a&gt; is an agent that ships the contents of
local logs to Grafana Enterprise Logs (GEL).&lt;/p&gt;
&lt;h2 id=&#34;verify-that-promtail-is-running&#34;&gt;Verify that Promtail is running&lt;/h2&gt;
&lt;p&gt;Because there are several ways to &lt;a href=&#34;/docs/loki/latest/clients/promtail/installation/&#34;&gt;Install Promtail&lt;/a&gt;, there are also several ways to verify that it is running. If you need help at all, submit a &lt;a href=&#34;/contact?about=support&amp;amp;topic=Verify%20Promtail%20is%20running&#34;&gt;Support Request&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the following common installation methods, check that Promtail is running:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;binary: To check that the executable is running, use &lt;code&gt;ps -ef | grep promtail&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Docker: To check if a Promtail container is running, run &lt;code&gt;docker ps&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Kubernetes: To check that Promtail pods are running, use the &lt;code&gt;kubectl get pods | grep promtail&lt;/code&gt; command when you are in the correct namespace.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;configure-promtail-to-write-to-gel&#34;&gt;Configure Promtail to write to GEL&lt;/h2&gt;
&lt;p&gt;To configure Promtail to send logs to the &lt;strong&gt;demo&lt;/strong&gt; tenant, add a clients block to its configuration.&lt;/p&gt;
&lt;p&gt;Example of a minimal configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;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: &amp;lt;token&amp;gt;

scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: varlogs
      __path__: /var/log/*log&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more information, refer to &lt;a href=&#34;/docs/loki/latest/clients/promtail/configuration/&#34;&gt;Configuring Promtail&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;run-this-promtail-configuration-using-docker&#34;&gt;Run this Promtail configuration using Docker&lt;/h2&gt;
&lt;p&gt;To run this configuration, store the preceding configuration locally in the file &lt;code&gt;promtail.yaml&lt;/code&gt;, and run the following code:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;$ docker run \
   -d \
   --name=demo-promtail \
   --network=enterprise-logs \
   -v $(pwd)/promtail.yaml:/etc/promtail/config.yml:z \
   grafana/promtail:2.1.0&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;verify-that-promtail-is-writing-to-gel&#34;&gt;Verify that Promtail is writing to GEL&lt;/h2&gt;
&lt;p&gt;From Grafana &lt;strong&gt;Explore&lt;/strong&gt;, you can query the data from your GEL cluster via the &lt;strong&gt;Enterprise Logs&lt;/strong&gt; data source.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-promtail-for-grafana-enterprise-logs">Configure Promtail for Grafana Enterprise Logs&lt;/h1>
&lt;p>&lt;a href="/docs/loki/latest/clients/promtail/">Promtail&lt;/a> is an agent that ships the contents of
local logs to Grafana Enterprise Logs (GEL).&lt;/p>
&lt;h2 id="verify-that-promtail-is-running">Verify that Promtail is running&lt;/h2>
&lt;p>Because there are several ways to &lt;a href="/docs/loki/latest/clients/promtail/installation/">Install Promtail&lt;/a>, there are also several ways to verify that it is running. If you need help at all, submit a &lt;a href="/contact?about=support&amp;amp;topic=Verify%20Promtail%20is%20running">Support Request&lt;/a>.&lt;/p></description></item></channel></rss>