Ejemplo n.º 1
0
 def execute(self) -> Iterator[ACResult]:
     if "checkresult" in self._get_effective_global_setting("alert_handler_event_types"):
         yield ACResultCRIT(_("Alert handler are configured to handle all check execution."))
     else:
         yield ACResultOK(_("Alert handlers will handle state changes."))
Ejemplo n.º 2
0
 def execute(self) -> Iterator[ACResult]:
     jobs = SiteBackupJobs()
     if jobs.choices():
         yield ACResultOK(_("You have configured %d backup jobs") % len(jobs.choices()))
     else:
         yield ACResultWARN(_("There is no backup job configured"))
Ejemplo n.º 3
0
 def execute(self) -> Iterator[ACResult]:
     if not rulebased_notifications_enabled():
         yield ACResultCRIT('Rulebased notifications are deactivated in the global settings')
     else:
         yield ACResultOK(_("Rulebased notifications are activated"))
Ejemplo n.º 4
0
 def execute(self) -> Iterator[ACResult]:
     if html.request.is_ssl_request:
         yield ACResultOK(_("Site is using HTTPS"))
     else:
         yield ACResultWARN(_("Site is using plain HTTP. Consider enabling HTTPS."))
Ejemplo n.º 5
0
 def execute(self):
     settings = watolib.load_configuration_settings()
     if settings['enable_rulebased_notifications'] != True:
         yield ACResultCRIT('Rulebased notifications are deactivated in the global settings')
     else:
         yield ACResultOK(_("Rulebased notifications are activated"))