Reputation: 6697
I use Grafana and Prometheus. Both are installed on the same server and I don't use docker.
Recently I've imported the Node-Exporter dashboard, and modified the prometheus.yml
file like this:
global:
scrape_interval: 15s
evaluation_interval: 15s
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "node"
static_configs:
- targets: ['localhost:9100']
But the node job can't get up. It is down:
Any idea how can I make it work?
Upvotes: 3
Views: 4582
Reputation: 61
This DID work:
curl 172.17.0.1:9100/metrics
while this DID NOT work:
curl http://localhost:9100/metrics
curl: (7) Failed to connect to localhost port 9100 after 0 ms: Connection refused
Upvotes: 1
Reputation: 31
I have configuration: prometheus in docker, node_exporter setup locally. from docker localhost is localhost inside container. I change
Upvotes: 3