Build precise queries to find exactly what you need
Press ESC to close
@afernique
Favorites0
Views
Projects0
after deleting some volumes we noticed the oid are not correctly cleaned and the plugin show errors in non existant volumes (at least non existant anymore) The solution was to first parse 1.3.6.1.4.1.674.11000.2000.500.1.2.26.1.5 finding when the value decrease (corresponding to badly removed volumes) then do the checks stopping on the maximum oid value. Thankfully copilot done the job and the correction is to replace the volume part in the bash with this one. volume) # Parse the OID to find the last value before it decreases stop_index=0 previous_value="" index=0 while read -r line; do current_value=$(echo "$line" | awk '{print $NF}') if [[ -n "$previous_value" && "$current_value" -lt "$previous_value" ]]; then stop_index=$index break fi previous_value="$current_value" index=$((index + 1)) done L Volumes: ${volumecrit[*]}" exit ${STATE_CRITICAL} elif [[ ${#volumewarn[@]} -gt 0 ]]; then echo "WARNING Volumes: ${volumewarn[*]}" exit ${STATE_WARNING} elif [[ ${#volumeunknown[@]} -gt 0 ]]; then echo "UNKNOWN Check Volumes, an unknown error occurred" exit ${STATE_UNKNOWN} elif [[ ${#volumeok[@]} -gt 0 ]]; then echo "OK Volumes: ${volumeok[*]}" exit ${STATE_OK} fi ;;
Reviewed 7 months ago