配置了网关监控就出现错误了
Closed this issue · 1 comments
错误信息
[zhaojiedi@vpc prometheus]$ kubectl -n monitoring logs aliyun-exporter-699f69944c-wckt4 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 64, in _get_names for metric in desc_func(): File "/usr/src/app/aliyun_exporter/collector.py", line 134, in collect yield from self.metric_generator(project, metric) File "/usr/src/app/aliyun_exporter/collector.py", line 125, in metric_generator gauge.add_metric([try_or_else(lambda: str(point[k]), '') for k in label_keys], point[measure]) KeyError: 'Average'
我的配置
`[zhaojiedi@vpc prometheus]$ cat aliyun-exporter-config.yml.2019.07.03.17
credential:
access_key_id: LTAITveITrbiHm6x
access_key_secret: AKLksmbAULSdWhcbWRJ4sFJkNZUTWh
region_id: cn-beijing
metrics:
acs_cdn:
- name: QPS
acs_mongodb: - name: CPUUtilization
period: 300
acs_nat_gateway: - name: SnatConnection
period: 60
#- name: net_rx.rate
period: 60
#- name: net_tx.rate
period: 60
#- name: net_rx.Pkgs
period: 60
#- name: net_tx.Pkgs
period: 60
#- name: net_tx.ratePercent
period: 60
- name: SnatConnectionDrop_ConcurrentConnectionLimit
period: 30 - name: SnatConnectionDrop_ConnectionRateLimit
period: 60`
其他:
使用样例的就没有问题, 添加了snat的监控就出错了。帮忙看下。
配置下measure就解决了。
acs_nat_gateway:
- name: SnatConnection
period: 60
measure: Maximum