Example #1
0
def warn_about_network_ports(old_site_id: SiteId, new_site_id: SiteId) -> None:
    if not Path("/omd/sites", old_site_id).exists():
        return  # Site was not copied

    logger.info("")
    warning(
        "Network port configuration may need your attention\n\n"
        "It seems like you copied an existing site. In case you plan to use both on the same "
        "system, you may have to review the network port configuration of your sites. Two sites"
        "with the same configuration may cause network port conflicts."
        "For example if you enabled livestatus to listen via TCP or enabled the Event Console "
        "to listen for incoming Syslog messages or SNMP traps, you may have to update the "
        "configuration in one of the sites to resolve the conflicts.\n")
Example #2
0
def warn_about_renamed_remote_site(old_site_id: SiteId,
                                   new_site_id: SiteId) -> None:
    """Warn user about central site that needs to be updated manually

    Detect whether or not this is a remote site and issue a warning to let the user known"""
    if not is_wato_slave_site():
        return

    logger.info("")
    warning(
        "You renamed a distributed remote site.\n\nTo make your distributed "
        "setup work again, you will have to update the \"Distributed Monitoring\" "
        "configuration in your central site.\n")
def warn_about_configs_to_review(old_site_id: SiteId,
                                 new_site_id: SiteId) -> None:
    logger.info("")
    warning(
        "Some configs may need to be reviewed\n\n"
        "Parts of the site configuration cannot be migrated automatically. The following\n"
        "parts of the configuration may have to be reviewed and adjusted manually:\n\n"
        "- Custom bookmarks (in users bookmark lists)\n"
        "- Hard coded site filters in custom dashboards, views, reports\n"
        "- Path in rrdcached journal files\n"
        "- NagVis maps or custom NagVis backend settings\n"
        "- Notification rule \"site\" conditions\n"
        "- Event Console rule \"site\" conditions\n"
        "- \"site\" field in \"Agent updater (Linux, Windows, Solaris)\" rules (CEE/CME only)\n"
        "- Alert handler rule \"site\" conditions (CEE/CME only)\n")