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
a96f6aef
Unverified
Commit
a96f6aef
authored
5 years ago
by
Sergey Leleko
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Create promtail-examples.md
simple configs and description
parent
5132a971
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-examples.md
+46
-0
46 additions, 0 deletions
docs/promtail-examples.md
with
46 additions
and
0 deletions
docs/promtail-examples.md
0 → 100644
+
46
−
0
View file @
a96f6aef
# promtail examples
#### In this file you can see simple examples of configure promtail
For work with 2 and more sources:
```
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
client:
url: http://ip_or_hostname_where_Loki_run:3100/api/prom/push
scrape_configs:
- job_name: system
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: varlogs
host: yourhost
__path__: /var/log/*.log
- job_name: someone_service
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: someone_service
host: yourhost
__path__: /srv/log/someone_service/*.log
```
#### Description
Scrape_config section of config.yaml contents are various jobs for parsing your logs on current host
`job`
and
`host`
these are tags on which you can filter parsed logs date on Grafana later
`__path__`
it is path to directory where stored your logs. (
*
)
*
- If you run promtail and this config.yaml in Docker container, you can use docker volumes for mapping real directories
with log to those folders in the container.
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