def agent_check_deregister(consul_url=None, checkid=None):
 ret = {}
 if (not consul_url):
  consul_url = _get_config()
  if (not consul_url):
   log.error('No Consul URL found.')
   ret['message'] = 'No Consul URL found.'
   ret['res'] = False
   return ret
 if (not checkid):
  raise SaltInvocationError('Required argument "checkid" is missing.')
 function = 'agent/check/deregister/{0}'.format(checkid)
 res = _query(consul_url=consul_url, function=function, method='GET')
 if res['res']:
  ret['res'] = True
  ret['message'] = 'Check {0} removed from agent.'.format(checkid)
 else:
  ret['res'] = False
  ret['message'] = 'Unable to remove check from agent.'
 return ret

def agent_check_deregister ( consul_url = None , checkid = None ) : ret = { } if ( not consul_url ) : consul_url = _get_config ( ) if ( not consul_url ) : log . error ( 'No Consul URL found.' ) ret [ 'message' ] = 'No Consul URL found.' ret [ 'res' ] = False return ret if ( not checkid ) : raise SaltInvocationError ( 'Required argument "checkid" is missing.' ) function = 'agent/check/deregister/{0}' . format ( checkid ) res = _query ( consul_url = consul_url , function = function , method = 'GET' ) if res [ 'res' ] : ret [ 'res' ] = True ret [ 'message' ] = 'Check {0} removed from agent.' . format ( checkid ) else : ret [ 'res' ] = False ret [ 'message' ] = 'Unable to remove check from agent.' return ret
the agent will take care of deregistering the check from the catalog .