fcastello.raspberrypi_exporter

Role Name

Ansible role to install a Prometheus exporter for collecting metrics from Raspberry Pi using the Prometheus Node Exporter textfile collector. This exporter is based on work from https://github.com/fahlke/raspberrypi_exporter, with some modifications to make it compatible with Ubuntu and to allow changes to the default configuration for the text file and command installation locations.

Requirements

  • systemd must be installed
  • vcgencmd (On Ubuntu, it will install the required package; Raspbian should already have it)

Role Variables

# Path where the exporter script will be installed
raspberrypi_exporter_script_path: /usr/local/bin
# Path where the textfile collector will write its file
raspberrypi_exporter_textcollector_path: /var/lib/node_exporter/textfile_collector/
# Filename for the textfile collector
raspberrypi_exporter_textcollector_file: raspberrypi-metrics.prom
# Default directory for systemd
raspberrypi_exporter_systemd_dir: /etc/systemd/system

# Prefix for the metrics
raspberrypi_exporter_metrics_prefix: rpi_

# Frequency of metric collection
# This follows the systemd timer format
# By default, it collects data every 15 seconds
raspberrypi_exporter_metrics_timer: "*:*:0,15,30,45"

Example Playbook

- hosts: all
  - name: Raspberry Pi exporter
    import_role:
      name: fcastello.raspberrypi_exporter

Limitations

  • Tested only with Ubuntu 18.04 and 20.04
  • Should also work with versions 16.04 and 16.10

License

MIT

Informazioni sul progetto

Role to install Raspberrypi exporter textfile collector

Installa
ansible-galaxy install fcastello.raspberrypi_exporter
Licenza
mit
Download
325
Proprietario