As part of a general overhaul of some Nagios scripts, I am adding parameters to the scripts so that the thresholds can be determined on a machine-by-machine basis. As an example, we are specifying percentage of disk free at which to trigger the critical and warning alerts.
One of the scripts monitors
/proc/sys/fs/inode-nr - this has two values,
nr_free_inodes. I don't have much understanding of the innards of UNIX, so I'm not quite sure whether it's possible to set a threshold on this file based upon the values within it.
nr_free_inodes would suggest that the number of in-use inodes can be calculated as
(nr_inodes - nr_free_inodes). Therefore, at a guess, as the number in-use gets closer to X% and Y% of
nr_inodes, the script should be triggering warning and critical alerts respectively.
Does this seem like a correct kind of assumption to make?