remote setup
seertenedos opened this issue · comments
Is there a way to configure this where the prometheus and graphfana are in one locations and all that logs and stats get pushed there? My reason is that i have a number of remote harvesters and one remote farmer so i thought it would be good to have a docker to bring up the stat/log collection per host and another for the display and endpoint of the collected stats and logs
Yes, prometheus (and loki) was designed specifically for that. As you said, you'd run the exporters (and promtail) on each host, then collect metrics (and logs) from each of them from a central server. For prometheus you'd just add the remote nodes as targets in prometheus.yml, e.g.
- job_name: 'node'
static_configs:
- targets: ['harvester1:9100', 'harvester2:9100']
Loki on the other hand operates on a push model, so you'd configure promtail on each node to push logs to the central loki server:
clients:
- url: http://loki-server:3100/loki/api/v1/push
thanks