Hey,
i start a new topic because i thin in the old one is to much written, that anybody know whats new.
I try to set up my second node where i want to grab the data of node 1 and 2.
But when i write this in the config, prometheus dont want to start:
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
job_name: node_storj_02
static_configs:
targets: ['name.ddns.net:9100']
job_name: node_storj_01
static_configs:
targets: ['localhost:9100']
job_name: storj
static_configs:
targets: ['name.ddns.net:9651']
labels:
instance: 'Node2'
targets: ['localhost:9651']
labels:
instance: 'Node1'
kevink
2
I think you need one job per target instead of only the job “storj” with 2 targets. That’s how I did it
Dont work if you mean that:
metrics_path defaults to ‘/metrics’
scheme defaults to ‘http’.
static_configs:
-
targets: [‘localhost:9090’]
-
job_name: node_storj_02
static_configs:
-
targets: [‘name.ddns.net:9100’]
-
job_name: node_storj_01
static_configs:
-
targets: [‘localhost:9100’]
-
job_name: storj
static_configs:
-
targets: [‘name.ddns.net:9651’]
labels:
instance: ‘Node2’
-
job_name: storj2
static_configs:
-
targets: [‘localhost:9651’]
labels:
instance: ‘Node1’
kevink
4
what does “systemctl status prometheus” say? It typically tells you the config error
pi@raspberrypi:~ $ sudo systemctl status prometheus
Unit prometheus.service could not be found.
kevink
6
guess you’ll have to search in the logs then
And if i start:
pi@raspberrypi:/opt/prometheus-2.16.0.linux-armv7 $ sudo nohup ./prometheus &
[1] 1153
pi@raspberrypi:/opt/prometheus-2.16.0.linux-armv7 $ nohup: ignoring input and appending output to ‘nohup.out’
[1]+ Exit 1 sudo nohup ./prometheus
But if i dont chance anything at the config it runs
kevink
8
Might be due to a bunch of wrong indentations, missing “-”, etc…
Try something like this (you might need to fix the indentation):
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: node_storj_02
static_configs:
- targets: ['name.ddns.net:9100']
- job_name: node_storj_01
static_configs:
- targets: ['localhost:9100']
- job_name: storj
static_configs:
- targets: ['name.ddns.net:9651']
- job_name:
static_configs:
- targets: ['localhost:9651']
Find it
Before the - only the spaces were missing. So he couldn’t start it.
So thats Topic is finished.