@Override protected void connectSensors() { super.connectSensors(); setBrokerUrl(); }
@Override protected void connectSensors() { super.connectSensors(); connectServiceUpIsRunning(); }
@Override protected void connectSensors() { super.connectSensors(); super.connectServiceUpIsRunning(); }
protected void callRebindHooks() { connectSensors(); waitForServiceUp(); }
@Override protected void connectSensors() { super.connectSensors(); connectServiceUpIsRunning(); setBrokerUrl(); }
@Override protected void connectSensors() { super.connectSensors(); WebAppServiceMethods.connectWebAppServerPolicies(this); JavaAppUtils.connectJavaAppServerPolicies(this); }
@Override protected void connectSensors() { super.connectSensors(); LOG.info("Adding policy {} to {}, during start", serverPoolMemberTrackerPolicy, this); addPolicy(serverPoolMemberTrackerPolicy); if (getUrl()==null) setAttribute(ROOT_URL, inferUrl()); resetServerPoolMemberTrackerPolicy(); }
@Override protected void connectSensors() { super.connectSensors(); ConfigToAttributes.apply(this); if ( ((VanillaJavaAppDriver)getDriver()).isJmxEnabled() ) { jmxPollPeriod = (jmxPollPeriod > 0) ? jmxPollPeriod : 500; jmxFeed = JavaAppUtils.connectMXBeanSensors(this, jmxPollPeriod); } connectServiceUpIsRunning(); }
@Override protected void postStartCustom() { entity().postDriverStart(); if (entity().connectedSensors) { // many impls aren't idempotent - though they should be! log.debug("skipping connecting sensors for "+entity()+" in driver-tasks postStartCustom because already connected (e.g. restarting)"); } else { log.debug("connecting sensors for "+entity()+" in driver-tasks postStartCustom because already connected (e.g. restarting)"); entity().connectSensors(); } entity().waitForServiceUp(); entity().postStart(); }
@Override protected void connectSensors() { super.connectSensors(); setAttribute(DB_URL, String.format("postgresql://%s:%s/", getAttribute(HOSTNAME), getAttribute(POSTGRESQL_PORT))); Location machine = Iterables.get(getLocations(), 0, null); if (machine instanceof SshMachineLocation) { String cmd = getDriver().getStatusCmd(); feed = SshFeed.builder() .entity(this) .machine((SshMachineLocation)machine) .poll(new SshPollConfig<Boolean>(SERVICE_UP) .command(cmd) .setOnSuccess(true) .setOnFailureOrException(false)) .build(); } else { LOG.warn("Location(s) %s not an ssh-machine location, so not polling for status; setting serviceUp immediately", getLocations()); setAttribute(SERVICE_UP, true); } }
@Override protected void connectSensors() { super.connectSensors();
@Override protected void connectSensors() { super.connectSensors(); setAttribute(DB_URL, String.format("mysql://%s:%s/", getAttribute(HOSTNAME), getAttribute(MYSQL_PORT)));
@Override protected void connectSensors() { super.connectSensors(); setAttribute(DB_URL, String.format("mysql://%s:%s/", getAttribute(HOSTNAME), getAttribute(MARIADB_PORT)));
@Override protected void connectSensors() { super.connectSensors(); Location machine = Iterables.get(getLocations(), 0, null);
@Override protected void connectSensors() { super.connectSensors(); connectServiceUpIsRunning();
@Override protected void connectSensors() { super.connectSensors(); connectServiceUpIsRunning(); httpFeed = HttpFeed.builder() .entity(this) .period(500, TimeUnit.MILLISECONDS) .baseUri(String.format("http://%s:%d/_stats", getAttribute(HOSTNAME), getHttpPort())) .poll(new HttpPollConfig<Integer>(REQUEST_COUNT) .onSuccess(HttpValueFunctions.jsonContents(new String[] { "httpd", "requests", "count" }, Integer.class)) .onError(Functions.constant(-1))) .poll(new HttpPollConfig<Integer>(ERROR_COUNT) .onSuccess(HttpValueFunctions.jsonContents(new String[] { "httpd_status_codes", "404", "count" }, Integer.class)) .onError(Functions.constant(-1))) .poll(new HttpPollConfig<Integer>(TOTAL_PROCESSING_TIME) .onSuccess(HttpValueFunctions.jsonContents(new String[] { "couchdb", "request_time", "count" }, Integer.class)) .onError(Functions.constant(-1))) .poll(new HttpPollConfig<Integer>(MAX_PROCESSING_TIME) .onSuccess(HttpValueFunctions.chain(HttpValueFunctions.jsonContents(new String[] { "couchdb", "request_time", "max" }, Double.class), new Function<Double, Integer>() { @Override public Integer apply(@Nullable Double input) { return Integer.valueOf(input.intValue()); } })) .onError(Functions.constant(-1))) .build(); WebAppServiceMethods.connectWebAppServerPolicies(this); }
@Override protected void connectSensors() { super.connectSensors();
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected void connectSensors() { super.connectSensors();