NRPE script for monitoring memory usage
I don't understand why it should be a warning to have over 80% of the system RAM available.  If anything needs a warning, it should be having under 20% of RAM available, right?

Reading each line into an array is overcomplicated.  The read builtin command is quite good at splitting each line of input into multiple variables.  (row_value_lenght is misspelled, by the way.)

The proc(5) man page says about /proc/meminfo:


  Each line of the file consists of a parameter name, followed by a colon, the value of the parameter, and an option unit of measurement (e.g., "kB").


There's no guarantee that the unit will be kB (as you have assumed in your printout), or that both lines of interest will have the same units.

Splitting up the calculation of mem_percentage is weird.

The echo statement should be line-wrapped for readability.

The cases for exit codes 0, 1 and 2 can be collapsed into one, using arithmetic.

#!/usr/bin/env bash

set -o errexit -o pipefail

warning=80
critical=90

while read -r label number unit ; do
    case "$label" in
      MemTotal:)
        mem_total=$number
        mem_total_unit=$unit
        ;;
      MemAvailable:)
        mem_avail=$number
        mem_avail_unit=$unit
        ;;
    esac
done &lt; /proc/meminfo

if [ -z "$mem_avail" -o "$mem_avail_unit" != "$mem_total_unit" ]; then
    echo "MEMORY UNKNWOWN - check script"
    exit 3
fi

mem_avail_percent=$(( 100 * $mem_avail / $mem_total ))
echo "MEMORY_TOTAL=$mem_total$mem_total_unit" \
     "MEMORY_AVAILABLE=$mem_avail$mem_avail_unit" \
     "|" \
     "MEMORY_IN_PERCENTAGE=$mem_avail_percent;$warning;$critical"
exit $(( ($mem_avail_percent &gt; $warning) + ($mem_avail_percent &gt; $critical) ))