canonical / prometheus-openstack-exporter

OpenStack exporter for the prometheus monitoring system
GNU General Public License v3.0
128 stars 113 forks source link

cache_file needs to be initialized on fresh deploys #52

Closed auria closed 1 year ago

auria commented 6 years ago

root@juju-8c40ac-1-lxd-11:~# curl 127.0.0.1:9183/metrics Traceback (most recent call last): File "/snap/prometheus-openstack-exporter/25/bin/prometheus-openstack-exporter", line 607, in do_GET neutron = Neutron() File "/snap/prometheus-openstack-exporter/25/bin/prometheus-openstack-exporter", line 220, in init with open(config['cache_file'], 'rb') as f: IOError: [Errno 2] No such file or directory: '/var/snap/prometheus-openstack-exporter/common/vno1'

If file doesn't exist, it should be initialized: https://github.com/CanonicalLtd/prometheus-openstack-exporter/blob/master/prometheus-openstack-exporter#L220

auria commented 6 years ago

If novarc is set with the correct credentials, a cache_file will be generated. The script should reflect such auth error instead of erroring as shared in the initial post.

digitalrane commented 4 years ago

PRs accepted :)

Pjack commented 1 year ago

Close the issue that stale over years.