beezwax / filemaker-facter

Facter custom facts for reporting FileMaker Server statistics & status
MIT License
6 stars 0 forks source link

Free disk space fact #8

Open sibrcode opened 9 years ago

sibrcode commented 9 years ago

Although not strictly related to FileMaker, a fact listing mounted volumes and their available space would be desirable.

Notifications for low disk space would be an additional plus.

sibrcode commented 7 years ago

The mountpoint fact, present since at least Puppet 3.4, is mentioned as a fact that can return the available bytes for a given path, but this is not present on the macOS installer for facter 2.4.6.

sibrcode commented 7 years ago

A bit cryptic, but could be a starting point to doing this for boot drive:

`(File.exists?('C:\\') ? `dir /-C\`.match(/(\d+) bytes free/) : `df .`.match(/(\d+)\s*\d*%/)).captures[0].to_i`
sibrcode commented 7 years ago

A macOS version of diskfree fact committed yesterday. Still need a Windows equivalent.