nebula版本:v1.1.0
测试环境:nebula单机
目前具备的条件:
http://机器ip:11000/get_stats
http://机器ip:12000/get_stats
http://机器ip:13000/get_stats
均能获取到对应的参数
基于
GitHub - vesoft-inc/nebula-stats-exporter: Data exporter of Nebula Graph 分支v1编译出来的nebula-stats-exporter 可执行文件
启动命令正确(非docker环境 ):
./nebula-stats-exporter --bare-metal --bare-metal-config-path=/config.yaml --listen-address=本机ip:9100
config.yaml配置如下:
version: v0.0.2
nebulaItems:
- instanceName: metad01
endpointIP: xx.xx.xx.xx
endpointPort: 11000
componentType: metad
- instanceName: graphd01
endpointIP: xx.xx.xx.xx
endpointPort: 13000
componentType: graphd
- instanceName: storaged01
endpointIP: xx.xx.xx.xx
endpointPort: 12000
componentType: storaged
nebula-stats-exporter执行日志显示能获取到对应的数据
重要信息:Collect Nebula Metrics Done
然后,设置了prometheus.yml为如下内容
global:
scrape_interval: 5s
evaluation_interval: 5s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['xx.xx.xx.xx:9090']
- job_name: 'nebula-stats-exporter'
static_configs:
- targets: ['xx.xx.xx:9100'] # nebula-stats-exporter metrics endpoints
现象: 普罗米修斯监控不到对应的数据。
访问9100端口,得到的数据为:
http://xx.xx.xx:9100/metrics
如下:
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
# TYPE promhttp_metric_handler_errors_total counter
promhttp_metric_handler_errors_total{cause="encoding"} 0
promhttp_metric_handler_errors_total{cause="gathering"} 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 538
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
求助一下,是不是我配置姿势不对