MLBZ521/MacAdmin

connectionState is always blank due to State: being moved to CloudInfo

Closed this issue · 2 comments

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 )

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
}

Hey @sslawter, sorry....I either missed this or forgot about it.... I've fixed this in 075323b.

Thanks for the heads up though!

I'm looking at few other things that can be fixed/improved as well.