Stats with "pct" not working as expected


The code states: Comparing the Aerospike value with the warning/critical passed values. Default comparison is if the Aerospike value is greater than the warning/critical value Stats with “pct” in them are checked to see if the Aerospike value is less than the warning/critical value.

However percent stats are not accounted for in the code. Has this feature not been implemented?

The test

# ./ -h e-nsmem-03 -p 3000 -n global_addition_set -s free-pct-disk -w 20 -c 15
Aerospike Stats - free-pct-disk=94|free-pct-disk=94.0%;20;15

# echo $?

The Question How do i mod the code to get this working as expected for pct stats?


You have to use the @ symbol

./ -h e-nsmem-03 -p 3000 -n global_addition_set -s free-pct-disk -w@95 -c@85 ; echo $?
Aerospike Stats - free-pct-disk=94|free-pct-disk=94.0%;@95;@85