build status

FreeNAS Naemon/Icinga/Nagios plugin which checks various stuff via FreeNAS REST API(v1.0).

Tested with: Naemon 1.0.5, Ruby 2.3.0, FreeNAS 9.10.2


check_freenas v0.1 []

This plugin checks various parameters of FreeNAS

  alerts      Notifies of alerts
  updates     Check if update is available
  datasets    Checks used space of all datasets in megabytes with perfdata.
              Exclude datasets: "-z tank -x dataset0,dataset1"
              Include datasets: "-z tank -i data,home"

Usage: check_freenas.rb [options]

    -s, --address ADDRESS            FreeNAS address (
    -u, --username USERNAME          Username to connect - only root possible
    -p, --password PASSWORD          Password for root
    -k, --insecure                   No ssl verification
    -m, --mode MODE                  Mode to check
    -z, --zpool ZPOOL                Zpool/Volume name
    -i, --include INCLUDE            Include dataset
    -x, --exclude EXCLUDE            Exclude dataset
    -w, --warning WARNING            Warning threshold
    -c, --critical CRITICAL          Critical threshold
    -v, --version                    Print version information
    -h, --help                       Show this help message


  • -s: FreeNAS url, only https supported,, mandatory
  • -u: only root is possible, mandatory
  • -k: if you've a self signed cert
  • -z: zpool name, mandatory for datasets mode
  • -i: only use this dataset, multiple values seperated with comma e.g. home,data,test
  • -x: exclude dataset, multiple values seperated with comma e.g. home,data,test



Check outstanding alerts.

./check_freenas.rb -s -u root -p  [-k] -m alerts
Warning - smartd is not running


Notifies of available updates.

./check_freenas.rb -s -u root -p  [-k] -m updates
Warning - There are pending updates. Go to System > Update to apply pending updates


Check used space in MB of all datasets with perfdata. Use include/exclude option to limit output.

./check_freenas.rb -s -u root -p  [-k] -m datasets -z tank -i data,home -w 1176000 -c 1185555
Warning - Dataset data used 1176133MB | home=910786MB;1176000;1185555 data=1176133MB;1176000;1185555