Exemple #1
0
def getAgentInfoFromReqMgr(serviceURL):
    """ get agent info from request mgr """
    reqMgr = RequestManager({'endpoint': serviceURL})
    try:
        if serviceURL.lower() == "local":
            gQueues = getGlobalQueues()
        else:
            gQueues = reqMgr.getWorkQueue()
    except Exception, ex:
        logging.warning("Error: %s" % str(ex))
        errorInfo = {}
        errorInfo['url'] = serviceURL
        errorInfo['status'] = "Request Manager down: %s" % serviceURL
        errorInfo['acdc'] = 'N/A'
        return [errorInfo]
Exemple #2
0
def getAgentInfoFromReqMgr(serviceURL):
    """ get agent info from request mgr """
    reqMgr = RequestManager({'endpoint':serviceURL})
    try:
        if serviceURL.lower() == "local":
            gQueues = getGlobalQueues()
        else:
            gQueues = reqMgr.getWorkQueue()
    except Exception, ex:
        logging.warning("Error: %s" % str(ex))
        errorInfo = {}
        errorInfo['url'] = serviceURL
        errorInfo['status'] = "Request Manager down: %s" % serviceURL
        errorInfo['acdc'] = 'N/A'
        return [errorInfo]
Exemple #3
0
def getSiteInfoFromReqMgr(serviceURL):
    """ get agent info from request mgr """

    reqMgr = RequestManager({'endpoint':serviceURL})
    #get information from global queue.
    try:
        if serviceURL.lower() == "local":
            queues = getGlobalQueues()
        ###TODO: add back when GlobalMonitor spins out as a separate application
        else:
            queues = reqMgr.getWorkQueue()
    except Exception, ex:
        logging.warning("Error: %s" % str(ex))
        errorInfo = {}
        errorInfo['site_name'] = serviceURL
        return [errorInfo]
Exemple #4
0
def getSiteInfoFromReqMgr(serviceURL):
    """ get agent info from request mgr """

    reqMgr = RequestManager({'endpoint': serviceURL})
    #get information from global queue.
    try:
        if serviceURL.lower() == "local":
            queues = getGlobalQueues()
        ###TODO: add back when GlobalMonitor spins out as a separate application
        else:
            queues = reqMgr.getWorkQueue()
    except Exception, ex:
        logging.warning("Error: %s" % str(ex))
        errorInfo = {}
        errorInfo['site_name'] = serviceURL
        return [errorInfo]
Exemple #5
0
def getRequestInfoFromReqMgr(serviceURL):
    """ get the request info from requestManager """

    ###TODO: add back when GlobalMonitor spins out as a separate application
    service = RequestManager({'endpoint':serviceURL})
    try:
        ### use request manager funtion directly
        ### TODO: remove this when GlobalMonitor spins out as a separate application
        if serviceURL.lower() == "local":
            
            baseResults = getOverview()
            urls = getGlobalQueues()
        else:
            baseResults = service.getRequestNames()
            urls = service.getWorkQueue()
    except Exception, ex:
        logging.error(str(ex))
        return DFormatter.errorFormatter(serviceURL, "RequestManger Down")
Exemple #6
0
def getRequestInfoFromReqMgr(serviceURL):
    """ get the request info from requestManager """

    ###TODO: add back when GlobalMonitor spins out as a separate application
    service = RequestManager({'endpoint':serviceURL})
    try:
        ### use request manager funtion directly
        ### TODO: remove this when GlobalMonitor spins out as a separate application
        if serviceURL.lower() == "local":

            baseResults = getOverview()
            urls = getGlobalQueues()
        else:
            baseResults = service.getRequestNames()
            urls = service.getWorkQueue()
    except Exception, ex:
        logging.error(str(ex))
        return DFormatter.errorFormatter(serviceURL, "RequestManger Down")