Connect multiple hosts running promtail to loki running on a separate host

Hi all first time posting here.

I have 3 different servers. This is the setup I want to achieve:

  1. Server1 (51.25.365.12): promtail
  2. Server2 (51.25.78.215): promtail
  3. Server3 (216.25.36.54): promtail, loki and grafana

All the promtail services’ should send the data to loki running on Server3. How will this be possible? Please share the config files for all promtail and loki yaml files.

I have tried to modified the promtail script to:

server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

clients:
  - url: http://216.25.36.54:3100/loki/api/v1/push

scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: devlogs
      __path__: /home/ubuntu/john/python/logs/*log

I made no changes to the loki config.yaml file but when I connect the loki as a data connection it does not show any data.

Please help!!

Note: The IPs are not actual IPs of the servers’.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.