aylei / blog

我的中文博客
https://www.aleiwu.com
22 stars 4 forks source link

post/aliyun-exporter-bp/ #9

Open utterances-bot opened 5 years ago

utterances-bot commented 5 years ago

编写 Prometheus Exporter: 以阿里云 Exporter 为例

https://aleiwu.com/post/aliyun-exporter-bp/

18511547952 commented 5 years ago

大佬内容干货很足,点star 加油!

SQGE commented 5 years ago

使用docker-compose启动的,aliyun-exporter一直报这个错误

AttributeError: 'NoneType' object has no attribute 'type'
Traceback (most recent call last):
  File "/usr/local/bin/aliyun-exporter", line 11, in <module>
    load_entry_point('aliyun-exporter', 'console_scripts', 'aliyun-exporter')()
  File "/usr/src/app/aliyun_exporter/__init__.py", line 39, in main
    REGISTRY.register(collector)
  File "/usr/local/lib/python3.7/site-packages/prometheus_client/registry.py", line 24, in register
    names = self._get_names(collector)
  File "/usr/local/lib/python3.7/site-packages/prometheus_client/registry.py", line 65, in _get_names
    for suffix in type_suffixes.get(metric.type, ['']):
AttributeError: 'NoneType' object has no attribute 'type'
doing-cr7 commented 3 years ago

我也是遇到了这个错误 AttributeError: 'NoneType' object has no attribute 'type' Traceback (most recent call last): File "/usr/local/bin/aliyun-exporter", line 11, in load_entry_point('aliyun-exporter', 'console_scripts', 'aliyun-exporter')() File "/usr/src/app/aliyun_exporter/init.py", line 39, in main REGISTRY.register(collector) File "/usr/local/lib/python3.7/site-packages/prometheus_client/registry.py", line 24, in register names = self._get_names(collector) File "/usr/local/lib/python3.7/site-packages/prometheus_client/registry.py", line 65, in _get_names for suffix in type_suffixes.get(metric.type, ['']): AttributeError: 'NoneType' object has no attribute 'type'