@Test public void testCheckWithSentinelCheckWhitelist() { Mockito.when(consoleDbConfig.sentinelCheckWhiteList(Mockito.anyBoolean())).thenReturn(new HashSet<>(mockClusters)); sentinelConfigCheck.doCheck(); Mockito.verify(alertManager, Mockito.never()) .alert(Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString()); }
protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } }
SentinelConfigCheck extends AbstractCrossDcIntervalCheck { protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } } }
SentinelConfigCheck extends AbstractCrossDcIntervalCheck { protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } }  }
SentinelConfigCheck extends AbstractCrossDcIntervalCheck { protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } }   }
SentinelConfigCheck extends AbstractCrossDcIntervalCheck { protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } }    }