Hello everyone,
I have the following environment:
Server A:
Working installation of Loki
Server B:
Working installation of Promtail
My problem is that I can’t get Promtail to send data to Loki.
Here are my two cofigs:
Code Loki
# This minimal config scrape only single log file.
# Primarily used in rpm/deb packaging where promtail service can be started during system init process.
# And too much scraping during init process can overload the complete system.
# https://github.com/grafana/loki/issues/11398
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /opt/prometheus/positions.yaml
clients:
- url: http://192.168.0.162:3100/loki/api/v1/push
scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: lamp_varlogs
#NOTE: Need to be modified to scrape any additional logs of the system.
__path__: /var/log/syslog
analytics:
reporting_enabled: false
Code Promtail
# This minimal config scrape only single log file.
# Primarily used in rpm/deb packaging where promtail service can be started during system init process.
# And too much scraping during init process can overload the complete system.
# https://github.com/grafana/loki/issues/11398
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /opt/prometheus/positions.yaml
clients:
- url: http://192.168.0.162:3100/loki/api/v1/push
scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: lamp_varlogs
#NOTE: Need to be modified to scrape any additional logs of the system.
__path__: /var/log/syslog
My only request is: Have a look at my configs, maybe I made a mistake and you can help me. If not, the error must be in my network, then I would contact you again separately.
Many thanks in advance!
Greetings Benuk
Translated with DeepL.com (free version)