예제 #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)