# Copyright (C) 2005-2025 Splunk Inc. All Rights Reserved. from migration_utility.si_prechecks.corrupt_kpis_objs_with_base_search_type_issues import ( CorruptKpisObjsWithBaseSearchTypeIssues, ) from migration_utility.si_prechecks.objects_having_dangling_kpi_threshold_template_id import ( ObjectsHavingDanglingKPIThresholdTemplateId, ) from migration_utility.si_prechecks.objects_having_dangling_shared_base_search_kpi import ( ObjectsHavingDanglingSharedBaseSearchKpi, ) from migration_utility.si_prechecks.missing_services_depending_on_me_references import ( MissingServicesDependingOnMeReferences, ) from migration_utility.si_prechecks.missing_services_depends_on_references import ( MissingServicesDependsOnReferences, ) from migration_utility.si_prechecks.duplicate_services_names import ( DuplicateServicesNames, ) from migration_utility.si_prechecks.dangling_services_depending_on_me_references import ( DanglingServicesDependingOnMEReferences, ) from migration_utility.si_prechecks.dangling_services_depends_on_references import ( DanglingServicesDependsOnReferences, ) from migration_utility.si_prechecks.missing_expected_linked_services_refs_to_svc_tmpl import ( MissingExpectedLinkedServiceReferenceToTheServiceTemplate, ) from migration_utility.si_prechecks.dangling_linked_services_refs_in_svc_tmpl import ( DanglingLinkedServiceReferenceInTheServiceTemplate, ) from migration_utility.si_prechecks.corrupt_kpis_objs_with_base_search_id_issues import ( CorruptKpisObjsWithBaseSearchIdIssues, ) from migration_utility.si_prechecks.service_templates_sync_status_issues import ( SvcTmplHavingSyncStatusIssues, ) from migration_utility.si_prechecks.kpi_with_empty_threshold_field import ( KpiWithEmptyThresholdField, ) from migration_utility.si_prechecks.svc_tmpl_linked_svc_count_mismatch_issues import ( SvcTmplLinkedSvcCountMismatchIssues, ) from migration_utility.si_prechecks.entities_with_dangling_deleted_service_references import ( EntitiesWithDanglingDeletedServiceReferences, ) from migration_utility.si_prechecks.enabled_services_having_no_entity_filter_rule import ( EnabledServicesHavingNoEntityFilterRule, ) from migration_utility.si_prechecks.large_number_of_kpis_associated_per_base_search import ( LargeNumberOfKpisAssociatedPerBaseSearch, ) from migration_utility.si_prechecks.dangling_service_reference_in_entites import ( DanglingServiceReferenceInEntities, ) from migration_utility.si_prechecks.missing_expected_svc_tmpl_refs_in_service import ( MissingExpectedServiceTemplateReferenceInService, ) from migration_utility.si_prechecks.consistency_of_acl_on_itsi_objects import ( ConsistencyOfACLObjects ) dict_for_mapping_precheck_ids = { "CorruptKpisObjsWithBaseSearchIdIssues": "SBS_MBSID", "CorruptKpisObjsWithBaseSearchTypeIssues": "SBS_ST", "ObjectsHavingDanglingKPIThresholdTemplateId": "DKTID", "ObjectsHavingDanglingSharedBaseSearchKpi": "SBS_DBSID", "DuplicateServicesNames": "DSN", "MissingServicesDependingOnMeReferences": "SVC_MDOMR", "MissingServicesDependsOnReferences": "SVC_MDOR", "DanglingServicesDependingOnMEReferences": "SVC_DDOMR", "DanglingServicesDependsOnReferences": "SVC_DDOR", "MissingExpectedLinkedServiceReferenceToTheServiceTemplate": "SVC_TMPL_MELSR", "DanglingLinkedServiceReferenceInTheServiceTemplate": "SVC_TMPL_DLSR", "SvcTmplHavingSyncStatusIssues": "SVC_TMPL_BSS", "SvcTmplLinkedSvcCountMismatchIssues": "SVC_TMPL_LSCM", "KpiWithEmptyThresholdField": "KPI_THRSHLD", "EntitiesWithDanglingDeletedServiceReferences": "ENT_DDSR", "EnabledServicesHavingNoEntityFilterRule": "SVC_ENT_FLTR", "LargeNumberOfKpisAssociatedPerBaseSearch": "KPI_BASE_THRSHLD", "DanglingServiceReferenceInEntities": "ENT_DSR", "MissingExpectedServiceTemplateReferenceInService": "MSTR_SVC", "ConsistencyOfACLObjects": "CNS_ACL" } dict_for_mapping_precheck_class = { "CorruptKpisObjsWithBaseSearchIdIssues": CorruptKpisObjsWithBaseSearchIdIssues, "CorruptKpisObjsWithBaseSearchTypeIssues": CorruptKpisObjsWithBaseSearchTypeIssues, "ObjectsHavingDanglingKPIThresholdTemplateId": ObjectsHavingDanglingKPIThresholdTemplateId, "ObjectsHavingDanglingSharedBaseSearchKpi": ObjectsHavingDanglingSharedBaseSearchKpi, "DuplicateServicesNames": DuplicateServicesNames, "MissingServicesDependingOnMeReferences": MissingServicesDependingOnMeReferences, "MissingServicesDependsOnReferences": MissingServicesDependsOnReferences, "DanglingServicesDependingOnMEReferences": DanglingServicesDependingOnMEReferences, "DanglingServicesDependsOnReferences": DanglingServicesDependsOnReferences, "MissingExpectedLinkedServiceReferenceToTheServiceTemplate": MissingExpectedLinkedServiceReferenceToTheServiceTemplate, "DanglingLinkedServiceReferenceInTheServiceTemplate": DanglingLinkedServiceReferenceInTheServiceTemplate, "SvcTmplHavingSyncStatusIssues": SvcTmplHavingSyncStatusIssues, "SvcTmplLinkedSvcCountMismatchIssues": SvcTmplLinkedSvcCountMismatchIssues, "KpiWithEmptyThresholdField": KpiWithEmptyThresholdField, "EntitiesWithDanglingDeletedServiceReferences": EntitiesWithDanglingDeletedServiceReferences, "EnabledServicesHavingNoEntityFilterRule": EnabledServicesHavingNoEntityFilterRule, "LargeNumberOfKpisAssociatedPerBaseSearch": LargeNumberOfKpisAssociatedPerBaseSearch, "DanglingServiceReferenceInEntities": DanglingServiceReferenceInEntities, "MissingExpectedServiceTemplateReferenceInService": MissingExpectedServiceTemplateReferenceInService, "ConsistencyOfACLObjects": ConsistencyOfACLObjects } dict_for_mapping_precheck_class_and_id = { CorruptKpisObjsWithBaseSearchIdIssues: "SBS_MBSID", CorruptKpisObjsWithBaseSearchTypeIssues: "SBS_ST", ObjectsHavingDanglingKPIThresholdTemplateId: "DKTID", ObjectsHavingDanglingSharedBaseSearchKpi: "SBS_DBSID", DuplicateServicesNames: "DSN", MissingServicesDependingOnMeReferences: "SVC_MDOMR", MissingServicesDependsOnReferences: "SVC_MDOR", DanglingServicesDependingOnMEReferences: "SVC_DDOMR", DanglingServicesDependsOnReferences: "SVC_DDOR", MissingExpectedLinkedServiceReferenceToTheServiceTemplate: "SVC_TMPL_MELSR", DanglingLinkedServiceReferenceInTheServiceTemplate: "SVC_TMPL_DLSR", SvcTmplHavingSyncStatusIssues: "SVC_TMPL_BSS", SvcTmplLinkedSvcCountMismatchIssues: "SVC_TMPL_LSCM", KpiWithEmptyThresholdField: "KPI_THRSHLD", EntitiesWithDanglingDeletedServiceReferences: "ENT_DDSR", EnabledServicesHavingNoEntityFilterRule: "SVC_ENT_FLTR", LargeNumberOfKpisAssociatedPerBaseSearch: "KPI_BASE_THRSHLD", DanglingServiceReferenceInEntities: "ENT_DSR", MissingExpectedServiceTemplateReferenceInService: "MSTR_SVC", ConsistencyOfACLObjects: "CNS_ACL" } dict_for_mapping_category = { dict_for_mapping_precheck_ids[ "CorruptKpisObjsWithBaseSearchIdIssues" ]: "Service and/or Service Template KPIs", dict_for_mapping_precheck_ids[ "CorruptKpisObjsWithBaseSearchTypeIssues" ]: "Service and/or Service Template KPIs", dict_for_mapping_precheck_ids[ "ObjectsHavingDanglingKPIThresholdTemplateId" ]: "Service and/or Service Template KPIs", dict_for_mapping_precheck_ids[ "ObjectsHavingDanglingSharedBaseSearchKpi" ]: "Service and/or Service Template KPIs", dict_for_mapping_precheck_ids["DuplicateServicesNames"]: "Service", dict_for_mapping_precheck_ids["MissingServicesDependingOnMeReferences"]: "Service", dict_for_mapping_precheck_ids["MissingServicesDependsOnReferences"]: "Service", dict_for_mapping_precheck_ids["DanglingServicesDependingOnMEReferences"]: "Service", dict_for_mapping_precheck_ids["DanglingServicesDependsOnReferences"]: "Service", dict_for_mapping_precheck_ids[ "MissingExpectedLinkedServiceReferenceToTheServiceTemplate" ]: "Service Template", dict_for_mapping_precheck_ids[ "DanglingLinkedServiceReferenceInTheServiceTemplate" ]: "Service Template", dict_for_mapping_precheck_ids["SvcTmplHavingSyncStatusIssues"]: "Service Template", dict_for_mapping_precheck_ids[ "SvcTmplLinkedSvcCountMismatchIssues" ]: "Service Template", dict_for_mapping_precheck_ids[ "KpiWithEmptyThresholdField" ]: "Service and/or Service Template KPIs", dict_for_mapping_precheck_ids[ "EntitiesWithDanglingDeletedServiceReferences" ]: "Service", dict_for_mapping_precheck_ids[ "EnabledServicesHavingNoEntityFilterRule" ]: "Service", dict_for_mapping_precheck_ids[ "LargeNumberOfKpisAssociatedPerBaseSearch" ]: "KPI Base Search", dict_for_mapping_precheck_ids[ "DanglingServiceReferenceInEntities" ]: "Entity", dict_for_mapping_precheck_ids[ "MissingExpectedServiceTemplateReferenceInService" ]: "Service", dict_for_mapping_precheck_ids[ "ConsistencyOfACLObjects" ]: "Role", } precheck_failure_severity = { dict_for_mapping_precheck_ids["CorruptKpisObjsWithBaseSearchIdIssues"]: "Moderate", dict_for_mapping_precheck_ids[ "CorruptKpisObjsWithBaseSearchTypeIssues" ]: "Moderate", dict_for_mapping_precheck_ids[ "ObjectsHavingDanglingKPIThresholdTemplateId" ]: "Moderate", dict_for_mapping_precheck_ids[ "ObjectsHavingDanglingSharedBaseSearchKpi" ]: "Moderate", dict_for_mapping_precheck_ids["DuplicateServicesNames"]: "Moderate", dict_for_mapping_precheck_ids["MissingServicesDependingOnMeReferences"]: "Minor", dict_for_mapping_precheck_ids["MissingServicesDependsOnReferences"]: "Minor", dict_for_mapping_precheck_ids["DanglingServicesDependingOnMEReferences"]: "Minor", dict_for_mapping_precheck_ids["DanglingServicesDependsOnReferences"]: "Moderate", dict_for_mapping_precheck_ids[ "MissingExpectedLinkedServiceReferenceToTheServiceTemplate" ]: "Minor", dict_for_mapping_precheck_ids[ "DanglingLinkedServiceReferenceInTheServiceTemplate" ]: "Moderate", dict_for_mapping_precheck_ids["SvcTmplHavingSyncStatusIssues"]: "Major", dict_for_mapping_precheck_ids["SvcTmplLinkedSvcCountMismatchIssues"]: "Minor", dict_for_mapping_precheck_ids["KpiWithEmptyThresholdField"]: "Moderate", dict_for_mapping_precheck_ids[ "EntitiesWithDanglingDeletedServiceReferences" ]: "Major", dict_for_mapping_precheck_ids[ "EnabledServicesHavingNoEntityFilterRule" ]: "Moderate", dict_for_mapping_precheck_ids[ "LargeNumberOfKpisAssociatedPerBaseSearch" ]: "Major", dict_for_mapping_precheck_ids[ "DanglingServiceReferenceInEntities" ]: "Major", dict_for_mapping_precheck_ids[ "MissingExpectedServiceTemplateReferenceInService" ]: "Minor", dict_for_mapping_precheck_ids[ "ConsistencyOfACLObjects" ]: "Major" } precheck_documentation_details = { dict_for_mapping_precheck_ids["CorruptKpisObjsWithBaseSearchIdIssues"]: { "Create KPI base searches in ITSI": "app.itsi.base_search_configuration" }, dict_for_mapping_precheck_ids["CorruptKpisObjsWithBaseSearchTypeIssues"]: { "Create KPI base searches in ITSI": "app.itsi.base_search_configuration" }, dict_for_mapping_precheck_ids[ "DanglingLinkedServiceReferenceInTheServiceTemplate" ]: {"Create a service template in ITSI": "app.itsi.create_service_template"}, dict_for_mapping_precheck_ids["DanglingServicesDependingOnMEReferences"]: { "Add service dependencies in ITSI": "app.itsi.service_dependency" }, dict_for_mapping_precheck_ids["DanglingServicesDependsOnReferences"]: { "Add service dependencies in ITSI": "app.itsi.service_dependency" }, dict_for_mapping_precheck_ids["DuplicateServicesNames"]: { "Create a single service in ITSI": "app.itsi.service_definition" }, dict_for_mapping_precheck_ids["KpiWithEmptyThresholdField"]: { "Create time-based static KPI thresholds in ITSI": "app.itsi.kpi_threshold_templates_lister" }, dict_for_mapping_precheck_ids[ "MissingExpectedLinkedServiceReferenceToTheServiceTemplate" ]: {"Create a service template in ITSI": "app.itsi.create_service_template"}, dict_for_mapping_precheck_ids["MissingServicesDependingOnMeReferences"]: { "Add service dependencies in ITSI": "app.itsi.service_dependency" }, dict_for_mapping_precheck_ids["MissingServicesDependsOnReferences"]: { "Add service dependencies in ITSI": "app.itsi.service_dependency" }, dict_for_mapping_precheck_ids["ObjectsHavingDanglingKPIThresholdTemplateId"]: { "Create time-based static KPI thresholds in ITSI": "app.itsi.kpi_threshold_templates_lister" }, dict_for_mapping_precheck_ids["ObjectsHavingDanglingSharedBaseSearchKpi"]: { "Create KPI base searches in ITSI": "app.itsi.base_search_configuration" }, dict_for_mapping_precheck_ids["SvcTmplHavingSyncStatusIssues"]: { "Create a service template in ITSI": "app.itsi.create_service_template" }, dict_for_mapping_precheck_ids["SvcTmplLinkedSvcCountMismatchIssues"]: { "Create a service template in ITSI": "app.itsi.create_service_template" }, dict_for_mapping_precheck_ids["EntitiesWithDanglingDeletedServiceReferences"]: { "Create a single service in ITSI": "app.itsi.service_definition" }, dict_for_mapping_precheck_ids["EnabledServicesHavingNoEntityFilterRule"]: { "Create a single service in ITSI": "app.itsi.service_definition" }, dict_for_mapping_precheck_ids["LargeNumberOfKpisAssociatedPerBaseSearch"]: { "Create KPI base searches in ITSI": "app.itsi.splitKPI" }, dict_for_mapping_precheck_ids["DanglingServiceReferenceInEntities"]: { "Create a single service in ITSI": "app.itsi.service_definition" }, dict_for_mapping_precheck_ids[ "MissingExpectedServiceTemplateReferenceInService" ]: {"Create a single service in ITSI": "app.itsi.service_definition"}, dict_for_mapping_precheck_ids[ "ConsistencyOfACLObjects" ]: {"Configure users and roles in ITSI": "app.itsi.roles"}, }