def execute(parameters=None, host_name=None): """ Returns a tuple containing the result code and a pre-formatted result label Keyword arguments: parameters (dictionary): a mapping of parameter key to value host_name (string): the name of this host where the alert is running """ try: check_windows_service_status("supervisor") return (RESULT_CODE_OK, ["Supervisor is running"]) except: return (RESULT_CODE_CRITICAL, ["Supervisor is stopped"])
def execute(configurations={}, parameters={}, host_name=None): """ Returns a tuple containing the result code and a pre-formatted result label Keyword arguments: configurations (dictionary): a mapping of configuration key to value parameters (dictionary): a mapping of script parameter key to value host_name (string): the name of this host where the alert is running """ try: check_windows_service_status("supervisor") return (RESULT_CODE_OK, ["Supervisor is running"]) except: return (RESULT_CODE_CRITICAL, ["Supervisor is stopped"])
def status(self, env): import status_params from resource_management.libraries.functions import check_windows_service_status check_windows_service_status( status_params.hive_metastore_win_service_name)
def status(self, env): import status_params from resource_management.libraries.functions import check_windows_service_status check_windows_service_status(status_params.hive_metastore_win_service_name)