I am not sure which version this change occurred, but State: has been moved to CloudInfo from Communications. This is causing the connectionState variable to be empty. The get_falconctl_stats function needs updated to include CloudInfo.
get_falconctl_stats() {
# Get the current stats.
# Arguments
# $1 = (str) path to falconctl
"${1}" stats agent_info Communications CloudInfo 2>&1
# Will eventually move to the --plist format, once it's fully supported
# "${1}" stats agent_info Communications CloudInfo --plist
}
I am not sure which version this change occurred, but State: has been moved to CloudInfo from Communications. This is causing the connectionState variable to be empty. The get_falconctl_stats function needs updated to include CloudInfo.
connectionState=$( echo "${falconctlStats}" | /usr/bin/awk -F "State:" '{print $2}' | /usr/bin/xargs )