示例#1
0
文件: client.py 项目: Darkpaw95/pymon
    def connectionLost(self, reason):
        # parse returned data
        log.debug(self.factory.data)
        parse = OutputParser(self.factory.data)
        loss = parse.getPingLoss()
        gain = parse.getPingGain()
        host = self.getHost()

        # threshold checks, messaging, and workflow
        self.processRules(gain, host=host, loss=loss, gain=gain)

        # update state information
        self.updateState()

        # dump info to log file
        log.info('State Data: '+str(self.factory.state.data)+'\n')

        # final cleanup
        LocalAgentClient.connectionLost(self, reason)
        ClientMixin.teardown(self)
示例#2
0
    def connectionLost(self, reason):
        # parse returned data
        log.debug(self.factory.data)
        parse = OutputParser(self.factory.data)
        loss = parse.getPingLoss()
        gain = parse.getPingGain()
        host = self.getHost()

        # threshold checks, messaging, and workflow
        self.processRules(gain, host=host, loss=loss, gain=gain)

        # update state information
        self.updateState()

        # dump info to log file
        log.info('State Data: ' + str(self.factory.state.data) + '\n')

        # final cleanup
        LocalAgentClient.connectionLost(self, reason)
        ClientMixin.teardown(self)
示例#3
0
    def connectionLost(self, reason):
        results = self.factory.data
        log.debug(results)

        # push the returned data through the threshold checks
        status = self.rules.check(gain)
        self.workflow.checkTransition(status, self.factory.cfg)
        #self.rules.setMsg(results['gain'], self.getHost())
        #self.rules.setSubj(self.getHost(), results['loss'])
        #if self.rules.isSendMessage():
        #    self.rules.sendIt()

        # dump info to log file
        log.debug('Service: %s' % self.factory.uid)
        log.debug("Status: %s for %s" % (self.rules.status, host))

        # update state information
        self.updateState()

        # dump info to log file
        log.info('State Data: ' + str(self.factory.state.data) + '\n')

        # final cleanup
        ClientMixin.connectionLost(self)
示例#4
0
文件: client.py 项目: Darkpaw95/pymon
    def connectionLost(self, reason):
        results = self.factory.data
        log.debug(results)

        # push the returned data through the threshold checks
        status = self.rules.check(gain)
        self.workflow.checkTransition(status, self.factory.cfg)
        #self.rules.setMsg(results['gain'], self.getHost())
        #self.rules.setSubj(self.getHost(), results['loss'])
        #if self.rules.isSendMessage():
        #    self.rules.sendIt()

        # dump info to log file
        log.debug('Service: %s' % self.factory.uid)
        log.debug("Status: %s for %s" % (self.rules.status, host))

        # update state information
        self.updateState()

        # dump info to log file
        log.info('State Data: '+str(self.factory.state.data)+'\n')

        # final cleanup
        ClientMixin.connectionLost(self)
示例#5
0
 def connectionMade(self):
     self.factory.deferred.callback("success")
     self.transport.loseConnection()
     ClientMixin.connectionMade(self)
示例#6
0
文件: client.py 项目: Darkpaw95/pymon
 def connectionMade(self):
     self.factory.deferred.callback("success")
     self.transport.loseConnection()
     ClientMixin.connectionMade(self)
示例#7
0
 def connectionMade(self):
     HTTPPageGetter.connectionMade(self)
     ClientMixin.connectionMade(self)
示例#8
0
文件: client.py 项目: Darkpaw95/pymon
 def connectionMade(self):
     LocalAgentClient.connectionMade(self)
     ClientMixin.setup(self)
示例#9
0
文件: client.py 项目: nakokulma/pymon
 def connectionMade(self):
     HTTPPageGetter.connectionMade(self)
     ClientMixin.connectionMade(self)
示例#10
0
 def connectionMade(self):
     LocalAgentClient.connectionMade(self)
     ClientMixin.setup(self)