We have Loki Server up and running on a Linux Instance as service; I can scrape the logs from localhost using Promtail. I have installed Promtail on another Linux Instance in the same subnet; But when I try to scrape logs from other Linux Instance using Promtail its not working.
I have used below config for Loki:
config:
auth_enabled: false
ingester:
chunk_idle_period: 3m
chunk_block_size: 262144
chunk_retain_period: 1m
max_transfer_retries: 0
lifecycler:
ring:
kvstore:
store: inmemory
replication_factor: 1
## Different ring configs can be used. E.g. Consul
# ring:
# store: consul
# replication_factor: 1
# consul:
# host: "consul:8500"
# prefix: ""
# httpclienttimeout: "20s"
# consistentreads: true
limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 168h
schema_config:
configs:
- from: 2018-04-15
store: boltdb
object_store: filesystem
schema: v9
index:
prefix: index_
period: 168h
server:
http_listen_port: 3100
storage_config:
boltdb:
directory: /data/loki/index
filesystem:
directory: /data/loki/chunks
chunk_store_config:
max_look_back_period: 0
table_manager:
retention_deletes_enabled: false
retention_period: 0s
Promtail Config:
[root@ip-172-30-209-119 ~]# cat /usr/local/bin/config-promtail.yml
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
scrape_configs:
- job_name: test
static_configs:- targets:
- localhost
labels:
job: test-log
env: dev
host: localhost
path: /home/ec2-user/test/*.log
- localhost
- targets: