Created
August 23, 2022 12:47
-
-
Save kenichi-shibata/508e179943a691e021e2f45481c888f2 to your computer and use it in GitHub Desktop.
loki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
http_listen_port: 9080 | |
grpc_listen_port: 0 | |
clients: | |
- url: "http://10.36.19.72:3100/loki/api/v1/push" | |
positions: | |
filename: /opt/promtail/positions.yaml | |
scrape_configs: | |
- job_name: ec2-logs | |
ec2_sd_configs: | |
- region: eu-west-1 | |
relabel_configs: | |
- action: replace | |
replacement: /var/log/ometascan/*.log | |
target_label: __path__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://grafana.com/docs/loki/latest/fundamentals/labels/ | |
https://grafana.com/blog/2020/07/13/loki-tutorial-how-to-set-up-promtail-on-aws-ec2-to-find-and-analyze-your-logs/ | |
https://computingforgeeks.com/forward-logs-to-grafana-loki-using-promtail/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
http_listen_port: 3100 | |
grpc_listen_port: 0 | |
positions: | |
filename: /tmp/positions.yaml | |
clients: | |
- url: "http://10.36.19.72:3100/loki/api/v1/push" | |
scrape_configs: | |
- job_name: system | |
static_configs: | |
- targets: | |
- localhost | |
labels: | |
job: varlogs | |
__path__: /var/log/*log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auth_enabled: false | |
server: | |
http_listen_port: 3100 | |
grpc_listen_port: 9096 | |
common: | |
path_prefix: /tmp/loki | |
storage: | |
filesystem: | |
chunks_directory: /tmp/loki/chunks | |
rules_directory: /tmp/loki/rules | |
replication_factor: 1 | |
ring: | |
instance_addr: 127.0.0.1 | |
kvstore: | |
store: inmemory | |
schema_config: | |
configs: | |
- from: 2020-10-24 | |
store: boltdb-shipper | |
object_store: filesystem | |
schema: v11 | |
index: | |
prefix: index_ | |
period: 24h | |
ruler: | |
alertmanager_url: http://localhost:9093 | |
# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration | |
# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ | |
# | |
# Statistics help us better understand how Loki is used, and they show us performance | |
# levels for most users. This helps us prioritize features and documentation. | |
# For more information on what's sent, look at | |
# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go | |
# Refer to the buildReport method to see what goes into a report. | |
# | |
# If you would like to disable reporting, uncomment the following lines: | |
#analytics: | |
# reporting_enabled: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment