.from(WEB_CONSOLE_ACCESSIBLE) .computing(Functionals.ifNotEquals(true).value("URL where Brooklyn listens is not answering correctly") ) .build());
@Test public void testUpdatingMap1() { entity.enrichers().add(Enrichers.builder() .updatingMap(MAP1) .from(LONG1) .computing(Functionals.ifEquals(-1L).value("-1 is not allowed")) .build()); doUpdatingMapChecks(MAP1); }
.from(URL_REACHABLE) .computing(Functionals.ifNotEquals(true).value("URL not reachable")) .build());
.from(MANAGEMENT_URL_UP) .computing(Functionals.ifNotEquals(true).value("Management URL not reachable") ) .build());
.from(NGINX_URL_ANSWERS_NICELY) .computing(Functionals.ifNotEquals(true).value("URL where nginx listens is not answering correctly (with expected header)") ) .build()); connectServiceUpIsRunning();
.from(SERVER_OK) .computing(Functionals.ifNotEquals(true).value("Crate server reports it is not ok.")) .build());
@Override protected Entity createNode(Location loc, Map<?, ?> flags) { MySqlNode node = (MySqlNode) super.createNode(loc, flags); if (!MySqlClusterUtils.IS_MASTER.apply(node)) { ServiceNotUpLogic.updateNotUpIndicator(node, MySqlSlave.SLAVE_HEALTHY, "Replication not started"); addFeed(FunctionFeed.builder() .entity(node) .period(Duration.FIVE_SECONDS) .poll(FunctionPollConfig.forSensor(MySqlSlave.SLAVE_HEALTHY) .callable(new SlaveStateCallable(node)) .checkSuccess(StringPredicates.isNonBlank()) .onSuccess(new SlaveStateParser(node)) .setOnFailure(false) .description("Polls SHOW SLAVE STATUS")) .build()); node.enrichers().add(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS) .from(MySqlSlave.SLAVE_HEALTHY) .computing(Functionals.ifNotEquals(true).value("Slave replication status is not healthy") ) .build()); } return node; }