binarybear-de / cmk_check_unifi-controller

Local Check for Check_MK to get information about UniFi devices from Controller
21 stars 2 forks source link

Add replacing of spaces in AP name #7

Closed binarybear-de closed 3 years ago

binarybear-de commented 3 years ago

If there are spaces the check will crash with a unknown-state

Implementation of a replacing with e.g. underscores is advised.

binarybear-de commented 3 years ago

Added replacing of spaces in values with underscores

Expanded line 40 from echo $JSON | jq " .$1 " | sed -e 's/"//g' to echo $JSON | jq " .$1 " | sed -e 's/ /_/g' | sed -e 's/"//g'