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
15a37238
Commit
15a37238
authored
5 years ago
by
Juho Mäkinen
Browse files
Options
Downloads
Patches
Plain Diff
Fix underscores with Markdown rendering in Promtail examples
parent
375ec5ed
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
+6
-6
6 additions, 6 deletions
docs/promtail.md
with
6 additions
and
6 deletions
docs/promtail.md
+
6
−
6
View file @
15a37238
...
...
@@ -14,20 +14,20 @@ The term "label" here is used in more than one different way and they can be eas
*
Labels starting with __ (two underscores) are internal labels. They are not stored to the loki index and are
invisible after Promtail. They "magically" appear from different sources.
*
Labels starting with
_
_meta_kubernetes_pod_label_
*
are "meta labels" which are generated based on your kubernetes
*
Labels starting with
\_\
_
meta_kubernetes_pod_label_
*
are "meta labels" which are generated based on your kubernetes
pod labels. Example: If your kubernetes pod has a label "name" set to "foobar" then the scrape_configs section
will have a label
_
_meta_kubernetes_pod_label_name with value set to "foobar".
will have a label
\_\
_
meta_kubernetes_pod_label_name with value set to "foobar".
*
There are other __meta_kubernetes_
*
labels based on the Kubernetes metadadata, such as the namespace the pod is
running (__meta_kubernetes_namespace) or the name of the container inside the pod (
_
_meta_kubernetes_pod_container_name)
*
The label
_
_path
_
_ is a special label which Promtail will read to find out where the log files are to be read in.
running (__meta_kubernetes_namespace) or the name of the container inside the pod (
\_\
_
meta_kubernetes_pod_container_name)
*
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.
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
and finally set visible labels (such as "job") based on the
_
_service
_
_ label.
such as
\_\
_
service
\_\
_
based on a few different logic, possibly drop the processing if the
\_\
_
service
\_\
_
was empty
and finally set visible labels (such as "job") based on the
\_\
_
service
\_\
_
label.
In general, all of the default Promtail scrape_configs do the following:
*
They read pod logs from under /var/log/pods/$1/
*
.log.
...
...
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