-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Is your feature request related to a problem? Please describe.
I'm not sure if this is already possible, but I couldn't figure it out so thought I would raise it here. I'm trying to check for file sizes in a single directory and would like it to output the individual file sizes in GiB. Using check_files, I can get this to give me a total directory size in GiB, but the individual files are measured in GB (or G in the output).
Describe the solution you'd like
I'm looking to configure a check that looks for Microsoft SQL Server database sizes in a single directory. The idea is that the SQL instances that use Express edition which have (with the exception of 2025 Express) a 10GB database limit, would have a check associated looking at the database directory and flagging any file that exceeds 9GB in size and report the individual file sizes in GiB.
Describe alternatives you've considered
My existing command looks like this:
define command {
command_name nrpe_check_sql_db_size
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_files -a "path=$_HOSTDATABASEPATH$" "pattern = $_SERVICEDBFILEEXT$" "critical = size > $_SERVICEDBSIZECRIT$" "perf-config=*(unit:GiB)" "detail-syntax=%(filename) - %(size:h)"
}
The check actually works, but the individual file sizes return in GB when using the human friendly format in %(size:h) rather than GiB, per the below screenshot:
Is it possible, or would it be possible to implement a change here so that individual file sizes are measured in GiB? This is mainly for consistency and tidiness so by no means a critical requirement.
Additional context
Add any other context or screenshots about the feature request here.