All this validation code is libraried out as well in the updated check_cloudera_manager_* plugins.