package=ambari-metrics-monitor
required_version=2.6.1.0
current_version="$( yum info $package | awk -F: '/Version/ {print $2}' )"
if [[ "$current_version" == "$required_version" ]]; then
echo "Good to go"
else
echo "Version mismatch - version $current_version is installed for $package"
fi