openstack-exporter docs - troubleshooting

Troubleshooting

Snap service is not running

If the openstack-exporter service crashes, the charm will report that it’s not running:

$  juju status openstack-exporter
...
openstack-exporter/0*  blocked   idle   15       10.5.0.233             snap service is not running, please check snap service
  grafana-agent/0*     active    idle            10.5.0.233

...

To see why it crashed, you can view the logs for the service. This can be done by searching the logs in Grafana:

  1. Navigate to “Explore”
  2. Select the Loki datasource.
  3. Filter by juju_unit equals the grafana-agent unit deployed with the openstack-exporter charm unit - in this case it’s grafana-agent/0.
  4. Using the “Line contains” filter, enter golang-openstack-exporter.service.

Or the logs can be viewed directly on the machine:

juju ssh openstack-exporter/0

# show the last 100 lines using snap
sudo snap logs -n 100 golang-openstack-exporter.service

# or using the systemd journal tool
journalctl -u snap.golang-openstack-exporter.service.service

# or search the syslog
less /var/log/syslog

Common reasons the service could crash include:

  • Could not verify the ssl certificate from keystone. In this case, see how to set a custom ssl ca.
  • Could not connect to keystone (or other openstack api endpoints). If the OpenStack deployment has multiple network spaces, check that the machine has an ip address on both the oam and internal spaces.