dcu / mongodb_exporter

MongoDB exporter for prometheus.io
MIT License
356 stars 216 forks source link

Get http://10.25.167.139:9001/metrics: dial tcp 10.25.167.139:9001: getsockopt: connection refused #71

Closed leeningli closed 7 years ago

leeningli commented 7 years ago

./mongodb_exporter-linux-amd64 -mongodb.uri=mongodb://10.25.167.139:24000/ssf_h5 -auth.pass=zqbs@2017 -auth.user=deployop cnsz142414:24000:hybrid >Listening on :9001 (scheme=HTTP, secured=no, clientValidation=no)

cnsz142414:24000:hybrid >netstat -an|grep 9001 tcp 0 0 0.0.0.0:9001 0.0.0.0:* LISTEN
tcp 0 0 10.25.167.139:9001 10.25.167.129:37895 TIME_WAIT
tcp 0 0 10.25.167.139:9001 10.25.167.129:38014 TIME_WAIT

the mongodb server has listen the port 9001,and prometheusServer can telnet 10.25.167.139 9001 why it happend?

My mongodb has any promble?

leeningli commented 7 years ago

cnsz142414:24000:hybrid >./mongodb_exporter-linux-amd64 -log_dir -auth.user deployop -auth.pass *** -mongodb.uri="mongodb://10.25.167.139:24000/admin" Listening on :9001 (scheme=HTTP, secured=no, clientValidation=no) E1027 09:55:49.397194 19226 connection.go:48] Cannot connect to server using url mongodb://localhost:27017: no reachable servers

I have use -mongodb.uri="mongodb://10.25.167.139:24000/admin" ,why it show: E1027 09:55:49.397194 19226 connection.go:48] Cannot connect to server using url mongodb://localhost:27017: no reachable servers

leeningli commented 7 years ago

mongodb_instance_local_time 1.509073622e+09

HELP mongodb_instance_uptime_estimate_seconds uptimeEstimate provides the uptime as calculated from MongoDB's internal course-grained time keeping system.

TYPE mongodb_instance_uptime_estimate_seconds counter

mongodb_instance_uptime_estimate_seconds 2.6097621e+07

HELP mongodb_instance_uptime_seconds The value of the uptime field corresponds to the number of seconds that the mongos or mongod process has been active.

TYPE mongodb_instance_uptime_seconds counter

mongodb_instance_uptime_seconds 2.6097621e+07

why these values is "2.6097621e+07" ,"2.6097621e+07"... My garafana can not show it rightly.