adding a check for btrfs disk space.
adding a check for btrfs disk space.

This was verified in a docker container running the sensu client. The host was coreos which has / as btrfs.

Output in different scenerios:

failure to run get proper btrfs data:

root@9b4ef9db387f:/etc/sensu# ./plugins/aio/check-btrfs.rb
sudo: btrfs: command not found
CheckBtrfs UNKNOWN: No devices found

Run plugin with no options (provided) accepting all defaults and having status "ok":

root@9b4ef9db387f:/etc/sensu# ./plugins/aio/check-btrfs.rb
CheckBtrfs OK: All devices usage under 85%

Run plugin with options that will have a status "warning":

root@9b4ef9db387f:/etc/sensu# ./plugins/aio/check-btrfs.rb -w 10 -c 90
CheckBtrfs WARNING: /dev/xvda9 28.75%

Run plugin with options that will have a status "critical":

root@9b4ef9db387f:/etc/sensu# ./plugins/aio/check-btrfs.rb -w 10 -c 24
CheckBtrfs CRITICAL: /dev/xvda9 28.75%

estately/sensu-community-plugins,Seraf/sensu-community-plugins,lfdesousa/sensu-community-plugins,plasticbrain/sensu-community-plugins,loveholidays/sensu-plugins,warmfusion/sensu-community-plugins,Squarespace/sensu-community-plugins,madAndroid/sensu-community-plugins,himyouten/sensu-community-plugins,cotocisternas/sensu-community-plugins,nilroy/sensu-community-plugins,warmfusion/sensu-community-plugins,rikaard-groupby/sensu-community-plugins,petere/sensu-community-plugins,Seraf/sensu-community-plugins,maoe/sensu-community-plugins,shnmorimoto/sensu-community-plugins,ideais/sensu-community-plugins,jbehrends/sensu-community-plugins,zerOnepal/sensu-community-plugins,luisdalves/sensu-community-plugins,khuongdp/sensu-community-plugins,Squarespace/sensu-community-plugins,cread/sensu-community-plugins,julienba/sensu-community-plugins,cmattoon/sensu-community-plugins,circleback/sensu-community-plugins,shnmorimoto/sensu-community-plugins,zerOnepal/sensu-community-plugins,tuenti/sensu-community-plugins,nagas/sensu-community-plugins,circleback/sensu-community-plugins,jennytoo/sensu-community-plugins,plasticbrain/sensu-community-plugins,JonathanHuot/sensu-community-plugins,gferguson-gd/sensu-community-plugins,aryeguy/sensu-community-plugins,alexhjlee/sensu-community-plugins,mecavity/sensu-community-plugins,plasticbrain/sensu-community-plugins,maoe/sensu-community-plugins,nilroy/sensu-community-plugins,lenfree/sensu-community-plugins,giorgiosironi/sensu-community-plugins,cotocisternas/sensu-community-plugins,madAndroid/sensu-community-plugins,circleback/sensu-community-plugins,emillion/sensu-community-plugins,tuenti/sensu-community-plugins,luisdalves/sensu-community-plugins,jennytoo/sensu-community-plugins,Seraf/sensu-community-plugins,lenfree/sensu-community-plugins,alertlogic/sensu-community-plugins,ideais/sensu-community-plugins,tuenti/sensu-community-plugins,cread/sensu-community-plugins,Squarespace/sensu-community-plugins,intoximeters/sensu-community-plugins,giorgiosironi/sensu-community-plugins,cotocisternas/sensu-community-plugins,maoe/sensu-community-plugins,lenfree/sensu-community-plugins,loveholidays/sensu-plugins,lfdesousa/sensu-community-plugins,loveholidays/sensu-plugins,plasticbrain/sensu-community-plugins,thehyve/sensu-community-plugins,zerOnepal/sensu-community-plugins,julienba/sensu-community-plugins,gferguson-gd/sensu-community-plugins,thehyve/sensu-community-plugins,shnmorimoto/sensu-community-plugins,new23d/sensu-community-plugins,cmattoon/sensu-community-plugins,Seraf/sensu-community-plugins,lenfree/sensu-community-plugins,emillion/sensu-community-plugins,mecavity/sensu-community-plugins,warmfusion/sensu-community-plugins,cread/sensu-community-plugins,alertlogic/sensu-community-plugins,ideais/sensu-community-plugins,petere/sensu-community-plugins,estately/sensu-community-plugins,petere/sensu-community-plugins,justanshulsharma/sensu-community-plugins,cmattoon/sensu-community-plugins,giorgiosironi/sensu-community-plugins,pkaeding/sensu-community-plugins,julienba/sensu-community-plugins,zerOnepal/sensu-community-plugins,justanshulsharma/sensu-community-plugins,jbehrends/sensu-community-plugins,JonathanHuot/sensu-community-plugins,gferguson-gd/sensu-community-plugins,alertlogic/sensu-community-plugins,emillion/sensu-community-plugins,cmattoon/sensu-community-plugins,nagas/sensu-community-plugins,aryeguy/sensu-community-plugins,cotocisternas/sensu-community-plugins,estately/sensu-community-plugins,justanshulsharma/sensu-community-plugins,alexhjlee/sensu-community-plugins,warmfusion/sensu-community-plugins,cread/sensu-community-plugins,luisdalves/sensu-community-plugins,rikaard-groupby/sensu-community-plugins,luisdalves/sensu-community-plugins,rikaard-groupby/sensu-community-plugins,khuongdp/sensu-community-plugins,gferguson-gd/sensu-community-plugins,nilroy/sensu-community-plugins,emillion/sensu-community-plugins,new23d/sensu-community-plugins,nilroy/sensu-community-plugins,himyouten/sensu-community-plugins,tuenti/sensu-community-plugins,jennytoo/sensu-community-plugins,estately/sensu-community-plugins,giorgiosironi/sensu-community-plugins,justanshulsharma/sensu-community-plugins,jbehrends/sensu-community-plugins,tuenti/sensu-community-plugins,mecavity/sensu-community-plugins,alertlogic/sensu-community-plugins,maoe/sensu-community-plugins,new23d/sensu-community-plugins,intoximeters/sensu-community-plugins,new23d/sensu-community-plugins,lfdesousa/sensu-community-plugins,JonathanHuot/sensu-community-plugins,himyouten/sensu-community-plugins,intoximeters/sensu-community-plugins,thehyve/sensu-community-plugins,pkaeding/sensu-community-plugins,aryeguy/sensu-community-plugins,shnmorimoto/sensu-community-plugins,madAndroid/sensu-community-plugins,JonathanHuot/sensu-community-plugins,nagas/sensu-community-plugins,alexhjlee/sensu-community-plugins,khuongdp/sensu-community-plugins,madAndroid/sensu-community-plugins,thehyve/sensu-community-plugins,pkaeding/sensu-community-plugins,himyouten/sensu-community-plugins,aryeguy/sensu-community-plugins,khuongdp/sensu-community-plugins,jennytoo/sensu-community-plugins,nagas/sensu-community-plugins,alexhjlee/sensu-community-plugins,circleback/sensu-community-plugins,julienba/sensu-community-plugins,mecavity/sensu-community-plugins,lfdesousa/sensu-community-plugins,jbehrends/sensu-community-plugins,intoximeters/sensu-community-plugins,ideais/sensu-community-plugins,pkaeding/sensu-community-plugins,Squarespace/sensu-community-plugins,petere/sensu-community-plugins,rikaard-groupby/sensu-community-plugins,loveholidays/sensu-plugins