Beispiel #1
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)
Beispiel #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)
Beispiel #3
0
 def connectionMade(self):
     LocalAgentClient.connectionMade(self)
     ClientMixin.setup(self)
Beispiel #4
0
 def connectionMade(self):
     LocalAgentClient.connectionMade(self)
     ClientMixin.setup(self)