The getzfs plugin calcluates wrong free space when used is more than quota0 bytes available .
RAW data from host:
OMD[site]:~$ telnet 192.0.2.56 656
Trying 192.0.2.56...
Connected to 192.0.2.56.
Escape character is '^]'.
<<<check_mk>>>
Version: 1.6.0p17
AgentOS: freebsd
Hostname: host.domain.ext
AgentDirectory: /etc/check_mk
DataDirectory:
SpoolDirectory:
PluginsDirectory: /usr/lib/check_mk_agent/plugins
LocalDirectory: /usr/lib/check_mk_agent/local
<<<df>>>
<<<zfsget>>>
[SNIP]
dataset13 name dataset13 -
dataset13 quota 0 local
dataset13 used 33419296463072 -
dataset13 available 11861098415520 -
dataset13 mountpoint /mnt/dataset13 default
dataset13 type filesystem -
[SNIP]
dataset13/MyFolder name dataset13/MyFolder -
dataset13/MyFolder quota 5497558138880 local
dataset13/MyFolder used 5497558146368 -
dataset13/MyFolder available 0 -
dataset13/MyFolder mountpoint /mnt/dataset13/MyFolder default
dataset13/MyFolder type filesystem -
[SNIP]
[df]
[SNIP]
dataset13 11583104083 162 11583103921 0% /mnt/dataset13
[SNIP]
dataset13/MyFolder 5368709127 5368709127 0 100% /mnt/dataset13/MyFolder
[SNIP]
Output form the plugin:
OMD[site]:~$ cmk -nv --checks=zfsget 192.0.2.56
Check_MK version 1.6.0p18
+ FETCHING DATA
[agent] Execute data source
[mgmt_ipmi] Execute data source
[piggyback] Execute data source
No piggyback files for 'FN01'. Skip processing.
No piggyback files for '192.0.2.56'. Skip processing.
[SNIP]
Filesystem /mnt/dataset13 OK - 73.81% used (30.39 of 41.18 TB), (warn/crit at 95.67%/97.84%), trend: +12.45 MB / 24 hours
[SNIP]
Filesystem /mnt/dataset13/MyFolder OK - 72.87% used (1.09 of 1.5 TB), (warn/crit at 100%/100%), trend: 0 B / 168 hours
[SNIP]
OK - [agent] Version: 1.6.0p17, OS: freebsd, [mgmt_ipmi] Version: 2.72, execution time 4.2 sec | execution_time=4.191 user_time=0.270 system_time=0.030 children_user_time=0.000 children_system_time=0.000 cmk_time_agent=2.996
That is not good. My full 5TiB dataset is now suddenly just 1.5TB and has a lot of free space. I am quite sure the result is skewed because Anyone around here that could help me fix the plugin?used
is bigger than quota
. However the plugin should be able to handle such an abnormality.