示例#1
0
    def __init__(self, uid, cfg):
        LocalAgentMonitor.__init__(self)
        BaseMonitor.__init__(self, uid, cfg)

        # get the info in order to make the next ping
        self.binary = self.cfg.defaults.binary
        count = '-c %s' % self.cfg.defaults.count
        self.args = [count, self.host]
        port = int(cfg.app.agents.local_command.port)
        self.reactorArgs = ('127.0.0.1', port, self)
示例#2
0
    def __init__(self, uid, cfg):
        LocalAgentMonitor.__init__(self)
        BaseMonitor.__init__(self, uid, cfg)

        # get the info in order to make the next ping
        self.binary = self.cfg.defaults.binary
        count = "-c %s" % self.cfg.defaults.count
        self.args = [count, self.host]
        port = int(cfg.app.agents.local_command.port)
        self.reactorArgs = ("127.0.0.1", port, self)
示例#3
0
 def __init__(self, uid, cfg):
     BaseMonitor.__init__(self, uid, cfg)
     self.ports = [int(x.strip()) for x in cfg.check.ports.split(',')]
     count = cfg.check.count or cfg.defaults.count or 1
     self.count = int(count)
     timeout = cfg.check.timeout or cfg.defaults.timeout or 1
     self.timeout = int(timeout)
     self.data = {
         'gain': {},
         'loss': {},
         'percent': {},
         'error': {}}
示例#4
0
 def __init__(self, uid, cfg):
     BaseMonitor.__init__(self, uid, cfg)
     self.page_url = 'http://%s' % self.checkConfig.uri
     # XXX write a getTimeout method
     #timeout = self.checkConfig.timeout
     #timeout = self.defaults.timeout
     self.agent = cfg.user_agent_string
     self.method = 'HEAD'
     self.status = None
     # XXX write a method to get the http port from defaults or service
     # config
     #port = self.checkConfig.http_port
     #import pdb;pdb.set_trace()
     port = int(self.defaults.remote_port)
     self.reactorArgs = (self.host, port, self)
示例#5
0
 def __init__(self, uid, cfg):
     BaseMonitor.__init__(self, uid, cfg)
     self.page_url = 'http://%s' % self.checkConfig.uri
     # XXX write a getTimeout method
     #timeout = self.checkConfig.timeout
     #timeout = self.defaults.timeout
     self.agent = cfg.user_agent_string
     self.method = 'HEAD'
     self.status = None
     # XXX write a method to get the http port from defaults or service
     # config
     #port = self.checkConfig.http_port
     #import pdb;pdb.set_trace()
     port = int(self.defaults.remote_port)
     self.reactorArgs = (self.host, port, self)
示例#6
0
 def __init__(self, uid):
     BaseMonitor.__init__(self, uid, cfg)
     self.page_url = ''
     self.text_check = ''
     self.checkdata = self.service.entries.entry(uri=self.uid)
示例#7
0
 def __init__(self, uid):
     BaseMonitor.__init__(self, uid, cfg)
     self.page_url = ''
     self.text_check = ''
     self.checkdata = self.service.entries.entry(uri=self.uid)