Charm: prometheus-zfs-exporter - released to edge

I’ve released a prometheus-zfs-exporter for use with prometheus2.

It helps you keep track of file-system usage on for example LXD hosts which uses ZFS as storage. I deploy this alongside with prometheus-node-exporter

So, as an example:

Lets say you have a LXD host, lxdhost0, running with ZFS backend storage. This LXD host might be standalone and was not initially deployed with Juju. But, you want to get ZFS metrics out of it and have it converted into Juju so that you can monitor it with prometheus & grafana.

  1. Start by adding a model for your LXD host(s).
juju add-model my-lxd-hosts
  1. Add the lxd-host machine as a manual host (There is a guide for that here)
juju add-machine ssh:ubuntu@lxdhost0
  1. Deploy a dummy charm to it - for example tiny-bash
juju deploy tiny-bash --to lxdhost0
  1. Deploy the exporters which we want:
juju deploy prometheus-zfs-exporter
juju deploy prometheus-node-exporter
juju relate prometheus-zfs-exporter tiny-bash
juju relate prometheus-node-exporter tiny-bash
  1. Deploy a prometheus2 instance and relate this to tiny-bash.
juju deploy prometheus2
juju relate tiny-bash prometheus2

When the deployment has settled, you can add the prometheus instance as a datasource in grafana or query it remotely.

Now after this, you could deploy grafana to this aswell and relate to prometheus, but I’ll leave that up to you to practice =)

I’ll be publishing an example dashboard with it soon also which gives you a start to visualize utilization of storage for ZFS.

@stgraber @hallback @tmihoc

2 Likes

Its now released it to stable.