Lines Matching refs:new_hosts

163         self.new_hosts = dict()
226 if host_name not in self.new_hosts:
227 self.new_hosts[host_name] = GenericHost()
228 self.new_hosts[host_name].name = host_name
229 self.new_hosts[host_name].uuid = h['uuid']
230 self.new_hosts[host_name].server = 'monitos'
233 self.new_hosts[host_name].status = self.STATES_MAPPING['hosts'][int(
239 self.new_hosts[host_name].last_check = datetime.datetime.fromtimestamp(
244 self.new_hosts[host_name].attempt = h['configuration']['maxCheckAttempts']
247 …self.new_hosts[host_name].status_information = BeautifulSoup(h['status']['output'].replace('\n', '…
249 … self.new_hosts[host_name].services[service_name].status_information = 'Cant parse output'
251 self.new_hosts[host_name].passiveonly = not (
255 … self.new_hosts[host_name].notifications_disabled = not (int(s['status']['notificationsEnabled']))
257 self.new_hosts[host_name].notifications_disabled = False
260 self.new_hosts[host_name].flapping = (int(h['status']['isFlapping']))
262 self.new_hosts[host_name].flapping = False
265 self.new_hosts[host_name].acknowledged = False
268 self.new_hosts[host_name].acknowledged = True
272 self.new_hosts[host_name].scheduled_downtime = True
274 self.new_hosts[host_name].scheduled_downtime = False
277 … self.new_hosts[host_name].status_type = 'soft' if int(h['status']['stateType']) == 0 else 'hard'
279 self.new_hosts[host_name].status_type = 'hard'
287 self.new_hosts[host_name].duration = strfdelta(
348 if host_name not in self.new_hosts:
349 self.new_hosts[host_name] = GenericHost()
350 self.new_hosts[host_name].name = host_name
351 self.new_hosts[host_name].uuid = s['configuration']['host']['uuid']
352 self.new_hosts[host_name].status = self.STATES_MAPPING['services'][0]
355 if service_name not in self.new_hosts[host_name].services:
356 self.new_hosts[host_name].services[service_name] = GenericService(
358 … self.new_hosts[host_name].services[service_name].host = s['configuration']['hostName']
359 self.new_hosts[host_name].services[service_name].uuid = s['uuid']
360 self.new_hosts[host_name].services[service_name].name = service_name
361 self.new_hosts[host_name].services[service_name].server = 'monitos'
364 … self.new_hosts[host_name].services[service_name].status = self.STATES_MAPPING['services'][int(
370 … self.new_hosts[host_name].services[service_name].last_check = datetime.datetime.fromtimestamp(
375 … self.new_hosts[host_name].services[service_name].attempt = s['configuration']['maxCheckAttempts']
378 …self.new_hosts[host_name].services[service_name].status_information = BeautifulSoup(s['status']['o…
380 … self.new_hosts[host_name].services[service_name].status_information = 'Cant parse output'
382 …self.new_hosts[host_name].services[service_name].passiveonly = not (int(s['status']['checksEnabled…
385 … self.new_hosts[host_name].services[service_name].notifications_disabled = not (
388 … self.new_hosts[host_name].services[service_name].notifications_disabled = False
391 … self.new_hosts[host_name].services[service_name].flapping = (int(s['status']['isFlapping']))
393 self.new_hosts[host_name].services[service_name].flapping = False
396 self.new_hosts[host_name].services[service_name].acknowledged = False
399 self.new_hosts[host_name].services[service_name].acknowledged = True
403 … self.new_hosts[host_name].services[service_name].scheduled_downtime = True
405 … self.new_hosts[host_name].services[service_name].scheduled_downtime = False
408 …self.new_hosts[host_name].services[service_name].status_type = 'soft' if int(s['status']['stateTyp…
410 self.new_hosts[host_name].services[service_name].status_type = 'hard'
419 self.new_hosts[host_name].services[service_name].duration = strfdelta(