I see in the strace the receipt of the comand from the browser:
read(5, "GET /metrics HTTP/1.1\r\nHost:
192.168.237.159:9100\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer:
http://192.168.237.159:9100/\r\nDNT: 1\r\nConnection: keep-alive\r\nUpgrade-Insecure-Requests: 1\r\n\r\n", 4096) = 384
Node-Exporter then collects vmstat responses And then it sits and waits, not returning this data. I did see an earlier error:
write(2, "time=\"2017-10-17T17:36:15-07:00\" level=info msg=\"No directory specified, see --collector.textfile.directory\" source=\"textfile.go:57\"\n", 133time="2017-10-17T17:36:15-07:00" level=info msg="No directory specified, see --collector.textfile.directory" source="textfile.go:57"
Which is in this code:
https://github.com/prometheus/node_exporter/blob/master/collector/textfile.goCould that be related? I used the same yml file for both CentOS6 and CentOS7 but only CentOS7 failed.
Here's the two prometheus YML I tried:
global:
scrape_interval: 10s
scrape_configs:
- job_name: node
static_configs:
- targets: ["localhost:9100"]
- job_name: prometheus
static_configs:
- targets: ["localhost:9090"]
And
scrape_configs:
- job_name: 'node resources'
scrape_interval: 15s
static_configs:
- targets:
- '
192.168.1.2:9100'
params:
collect[]:
- cpu
- meminfo
- diskstats
- netdev
- netstat
- job_name: prometheus
static_configs:
- targets: ["localhost:9090"]