Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Loki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Loki
Commits
55b5be3f
Commit
55b5be3f
authored
5 years ago
by
Juho Mäkinen
Browse files
Options
Downloads
Patches
Plain Diff
Clarify that Promtail can also be used outside kubernetes
parent
9f5194f6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/promtail.md
+8
-5
8 additions, 5 deletions
docs/promtail.md
with
8 additions
and
5 deletions
docs/promtail.md
+
8
−
5
View file @
55b5be3f
## Promtail and scrape_configs
Promtail is an agent which reads the Kubernetes pod log files and sends streams of log data to
the centralised Loki instances along with a set of labels. Each container in a single pod will usually yield a
single log stream with a set of labels based on that particular pod Kubernetes labels.
Promtail is an agent which reads log files and sends streams of log data to
the centralised Loki instances along with a set of labels. For example if you are running Promtail in Kubernetes
then each container in a single pod will usually yield a single log stream with a set of labels
based on that particular pod Kubernetes labels. You can also run Promtail outside Kubernetes, but you would
then need to customise the scrape_configs for your particular use case.
The way how Promtail finds out the log locations and extracts the set of labels is by using the
*scrape_configs*
section in the Promtail yaml configuration. The syntax is the same what Prometheus uses.
...
...
@@ -22,8 +24,9 @@ The term "label" here is used in more than one different way and they can be eas
*
The label
\_\_
path
\_\_
is a special label which Promtail will read to find out where the log files are to be read in.
The most important part of each entry is the
*relabel_configs*
which are a list of operations which creates,
renames, modifies or alters labels. A single scrape_config can also reject logs by doing an "action: drop" which means
that this particular scrape_config will not forward logs from a particular pod, but another scrape_config might.
renames, modifies or alters labels. A single scrape_config can also reject logs by doing an "action: drop" if
a label value matches a specified regex, which means that this particular scrape_config will not forward logs
from a particular log source, but another scrape_config might.
Many of the scrape_configs read labels from
\_\_
meta_kubernetes_
*
meta-labels, assign them to intermediate labels
such as
\_\_
service
\_\_
based on a few different logic, possibly drop the processing if the
\_\_
service
\_\_
was empty
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment